Just posted an example on this - lots in the archive.  Basically don't want t
use iterate at all.  In your form bean load a collection with beans with label
and value attributes, and then use the html:options tag.

Much cleaner!!

Cheers,

Dave

PS  Don't forget the bean:define if you are not using html:optionCollection tag.




"Juan Alvarado \(Struts List\)"
<[EMAIL PROTECTED]> on 04/18/2002 02:15:01 PM

Please respond to "Struts Users Mailing List"
      <[EMAIL PROTECTED]>; Please respond to
      [EMAIL PROTECTED]

To:   "Struts" <[EMAIL PROTECTED]>
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  Logic inside iterate tag



Can anyone tell me what the proper way to convert the scriptlets in the
below code to the correspoding struts tags.

Since I am working with a two dimensional array here, I am sort of confused
as to how to integrate it with the struts tags.  Any help with this is
greatly appreciated.


<html:select property="dateRangeMonthFrom">
     <logic:iterate id="calendar" name="mc" property="months" scope="session">
          <% String[] dateRangeMonthFrom = (String[])calendar; %>
          <html:option value="<%=dateRangeMonthFrom[1]%>"><%=
dateRangeMonthFrom[0]
%></html:option>
     </logic:iterate>
</html:select>



**********************************************
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


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








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

Reply via email to