From: "Daniel Kies" <[EMAIL PROTECTED]>
> in JSP to show the list in a drop down:
> <select name="status">
> <logic:iterate indexId="id" id="statusList" name="statusList">
>         <option value="<bean:write name="statusList"
> property="statusType"/>"><bean:write name="statusList"
> property="statusType" /></option>
> </logic:iterate>
> </select>

Why are you not using the <html:select> and <html:options> (or
<html:optionsCollections>)  tags?  You don't have to iterate over the
collection, the framework will do it for you.

Example:
<html-el:select property="type">
   <html-el:options collection="contactTypes" property="key"
labelProperty="value"/>
</html-el:select>
(contactTypes is a Map sitting in Application scope, but it'll work with
other Collections in other scopes.)

Is your problem is that you are setting the values back into the form but
they are not getting 'pre-selected' by Struts?  (You need to use the Struts
tags for that to happen.)

Or is your question _how_ to set the values in the dynamic form bean?
Should be...
( (DynaActionForm) form ).set( "fieldName", myList );

Post some of the code that's giving you trouble so we can see what you're
doing instead of guessing.

-- 
Wendy Smoak


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

Reply via email to