struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@lexmark.com
Subject Re: Logic inside iterate tag
Date Thu, 18 Apr 2002 18:54:51 GMT


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\)"
<juan_alvarado%manduca.com@interlock.lexmark.com> on 04/18/2002 02:15:01 PM

Please respond to "Struts Users Mailing List"
      <struts-user%jakarta.apache.org@interlock.lexmark.com>; Please respond to
      juan_alvarado%manduca.com@interlock.lexmark.com

To:   "Struts" <struts-user%jakarta.apache.org@interlock.lexmark.com>
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
jalvarado@manduca.com
AOL Instant Messenger: juan2000@aol.com


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>








--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message