-1

I am new to spring web flow. I have an list and I want an expression to be evaluated as many time as the size of the list. Sample code is-

<evaluate expression="myController.save(itemController.selectedList)" result="flowScope.item"/>

Here selectedList is an list of items. I want it to be something like-

for(Item item: selectedList) {
    <evaluate expression="myController.save(item)" result="flowScope.item"/>
}

Here I want iterating through the list and evaluation the expression with each iteration. Is this possible to do so in xml file?

rahul0789
  • 327
  • 1
  • 3
  • 7

1 Answers1

0

it doesn't really make sense. what you should do is call a service method or create a method in your controller that does this, myController. saveItemList(List itemList) which call the saveItem method on each item of the list and maybe returns a list of items too. Then you can call it from the XML

rptmat57
  • 3,643
  • 1
  • 27
  • 38
  • Hi rptmat57, thank you for your reply. I guess in the question I was not very clear on what I want to do. A better description is in http://stackoverflow.com/questions/14711101/not-able-to-create-multiple-instances-of-an-input-set-in-flowscope. I hope you can help. – rahul0789 Feb 05 '13 at 15:37