If you are useing the DynaForm to hold the list just make sure you put the array into the DynaForm, under a predifined property name that has the same type(Array, List, ..) Then:

<logic:iterate name='dynaFormName' property='indexedProtertiesName' id='nameToUseForElements'>
<bean:write name='nameToUseForElements' property='userName'/>
<bean:write name='nameToUseForElements' property='email'/>
</logic:iterate>

or even better nested within approprite form tags:

<nested:iterate property='indexedProtertiesName'>
<nested:write property='userName'/>
<nested:write property='email'/>
</nested:iterate>


On Thu, 30 Jan 2003 18:18:01 +0100
Boris Folgmann <[EMAIL PROTECTED]> wrote:
Matthew Meyer wrote:
Your Action gets passed a copy of the actionForm object that it is useing. So specify the name of your DynaValidatorForm in the name property of your action's definition. Then populate the actionForm oject in your action and forward to the JSP that expects a populated DynaValidatorForm..
That seems to be the right method for e.g. editing one record in a
database. Tnx, that's what I need next.

But what should I use as the data source for <logic:iterate>, when I need
multiple objects? Here's how I did it with a simples ActionForm, a static
Function of the Form returning an array:

/** Query all users from db
*/
public static UserEditForm[] getUserList() throws SQLException
{
UserEditForm[] users = null;
...
users = new UserEditForm[num_users];

for (int i = 0; rs.next(); i++)
{
UserEditForm u = new UserEditForm();
u.setUsername(rs.getString("username"));
u.setEmail(rs.getString("email"));
users[i] = u;
...
}
...
return users;
}

--
Dipl.-Inf. Boris Folgmann mailto:[EMAIL PROTECTED]
Folgmann IT-Consulting http://www.folgmann.de


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


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

Reply via email to