Juan Alvarado wrote:

In my form bean I have an array list called categories that contains
objects of type Category. Each Category object contains an array list
of Steps.

So in my jsp I am rendering this relation as follows:

<nested:iterate indexId='idx' name='auditmaster'
property='categories' id='cat'
type='com.securance.vo.ApStepCategoryVO'> <h3><nested:write
property='category'/></h3> <br> <nested:iterate name='cat'
property='steps' id='step' type='com.securance.vo.ApStepVO'> <nested:textarea property='step' cols='65' rows='2'/><br> </nested:iterate> </nested:iterate>


First I iterate through the Category array list and then for each
Category I iterate through the steps array list in each category.
This renders just fine. The problem is that when a user edits each
step and submits the form, only the stesp for the first Category get
updated. The rest remain unchanged. I need for the user to be able to
edit everything and then submit the form and have the edits be
reflected in this nested relationship.

Hey Juan. What does the source code look like?

I think the source code will reveal a lot. Are you sure your collections aren't getting pulled from some other scope other than the form bean?

Also I never use "name" or the "type" in my nested:iterate loops. I think that could be the problem. If you use name it will look for that 'name' of the collection in scope. You want to make sure you are using the collection that is nested inside of the other one. If you remove name and type and it still doesn't work that will reveal a lot of the problem.

For example if you have a Collection of "categories" (of ApStepCategoryVO) in you form bean you should be able to do

<nested:iterate property='categories' id='cat' >
    <h3><nested:write property='category'/></h3>
    <br>
    <nested:iterate  property='steps' id='step'>
        <nested:textarea property='step' cols='65' rows='2'/><br>
    </nested:iterate>
</nested:iterate>

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to