struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From O_Parthasarathy Kesavaraj <Parthasarat...@PLANETASIA.COM>
Subject RE: logic:iterate using HashMap
Date Wed, 25 Jun 2003 04:28:38 GMT
Thanks rick.I loaded a select box containing id and values like this
					<bean:define id="company"
name="companies" />
					<html:select property="companyID">
						<html:options
collection="company" property="key" labelProperty="value"/>
					</html:select>
Regards
Partha


> ----------
> From: 	Rick Reumann[SMTP:r@reumann.net]
> Reply To: 	Struts Users Mailing List
> Sent: 	Tuesday, June 24, 2003 8:28 PM
> To: 	Struts Users Mailing List
> Subject: 	RE: logic:iterate using HashMap
> 
> Thanks rick.I loaded a select box containing id and values like this
> 					<bean:define id="company"
> name="companies" />
> 					<html:select property="companyID">
> 						<html:options
> collection="company" property="key" labelProperty="value"/>
> 					</html:select>
> Regards
> Partha
> On Tue, 2003-06-24 at 10:46, O_Parthasarathy Kesavaraj wrote:
>  
> > > O_Parthasarathy Kesavaraj írta:
> > 	Thanks Tib.I did look at the docs.But i got struck up.If u have any
> > sample code pls send.
> 
> I admit the docs I think are lame on this area. This should work..
> 
> <logic:iterate id="element" name="yourMap">
>     <bean:write name="element" property="key"/> - 
>     <bean:write name="element" property="value"/><BR>
> </logic:iterate>
> 
> JSTL should be something like...
> 
> <c:forEach var="element" items="${yourMap}">
>   <c:out value="${element.key}"/> -
>   <c:out value="${element.value}"/><br>
> </c:forEach>
> 
> -- 
> Rick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 

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


Mime
View raw message