Hi

apologies if this has been asked before but mail-archive seems to be busted.

I have a form which has these methods

    public void setMenuSections(MenuSectionEntityValue[] menuSections)

    public MenuSectionEntityValue[] getMenuSections()

    public MenuSectionEntityValue getMenuSection(int idx)

previously when using logic:iterate I would declare as follows:

<logic:iterate name"myForm" property="menuSections" id="menuSection">
    <html:hidden name="menuSection" property="name" indexed="true"/>
..........

this would generate html:
    <input type="hidden" name="menuSection[0].name">

the problem I have is that the nested tags:
<nested:iterate property="menuSections">
    <html:hidden property="name" />

generates the following html:
    <input type="hidden" name="menuSections[0].name">

this then causes problems on submit as BeanUtils accesses the collection through the getMenuSections method rather than the indexed accessor. I need the indexed accessor as this is how I 'grow' the collection internally as needed. Without it I get ArrayIndexOutOfBounds......

is it possible to instruct the nested tags to use different values when generating the names of the fields? If not, how are you supposed to work with collections that may increase in size at the client?

thanks Nathan


-- Nathan Coast Managing Director Codeczar Ltd mob : (852) 9049 5581 tel : (852) 2834 8733 fax : (852) 2834 8755 web : http://www.codeczar.com

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



Reply via email to