This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
hello, I am using logic:iterate to get multiple input parameters.The logic:iterator tag in my jsp is as shown.
<logic:iterate name="rowsForm" property="iterator" id="row" type="test.RowForm"> </logic:iterate> In my Form. i have get and set property for the String RowId and String RowProperty The error is Cannot create iterator for this collection So wat should be the getter and setter for iterator. Can anyone plz explain this. Thanks in advance Sana
Joined: Feb 03, 2004
hello, Thanks but i just found out the answer for my question.Iterator iterates through a 'collection' of my property. But i am facing another problem.... In my Jsp page i am unable to get a textfield initially.Only after submitting the form the textfield is seen populated with the values which i have populated manually. I am unable to figure out the reasons for this. Can anyone plz guide. Thanks, Sana
There could be a number of reasons. You say the textfields should have pre-populated values - where are you setting these values in your code??? My first hunch would be to say that your form is resetting your values to null. How 'bout some code?
I am not getting the textfield(of rowproperty) displayed in the jsp page initially.Is it becos the iterator iterates only when the collection is not null. Only the <th>id and <th>rowproperty is displayed. But no textfield for the rowproperty. Only when submitted the textfield is displayed with the values assigned in the form to the properties. How to go abt this.
The iterator can't iterate if the collection is null, or even if the collection isn't null but holds no Objects. There's nothing to iterate through in that case. It says "for each object found in the collection, do what's between the tags". If no objects are found, you'll never see what is between the tags.
Joined: Feb 03, 2004
hello, Thanks,,I have got it to work.I just had to intialize the property in the form. regards, Sana