tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: combining tags
Date Wed, 06 Jul 2005 18:26:14 GMT
To clarify some comments from other responders:

It is a good idea to use Struts-EL if you're going to use the JSTL.
However, for this particular example, the Struts tag library itself has
knowledge of "c:forEach", as opposed to "logic:iterate", so an "html"
Struts tag that uses "indexed=true" will work inside a "c:forEach", at
least with respect to generating the correct indexed property values.

> -----Original Message-----
> From: Tom Holmes Jr. [mailto:tom@tomholmes.net] 
> Sent: Wednesday, July 06, 2005 8:02 AM
> To: Tag Libraries Users List
> Subject: combining tags
> 
> 
> I used to have some JSP code that looked like:
> 
>  <logic:iterate name="myForm" property="myDataList" id="iter">
>         <html:checkbox name="iter" property="checkedRes" 
> indexed="true"/>
>         <bean:write name="iter" property="roomType"/>
>        <html:text name="iter" property="numItems" indexed="true" 
> style="width:40"/>
>  </logic:iterate>
> 
> I'd like to switch to something likes this:
> <c:forEach items="${SelectedRoomsForm.roomsList}" var="data" 
> varStatus="status">
>         <html:checkbox name="data" property="checkedRes" 
> indexed="true"/>
>         <c:out value="${data.roomType}"/>
>        <html:text name="data" property="numItems" indexed="true" 
> style="width:40"/>
> </c:forEach>
> 
> The <c:out> tag I am sure works, but I am not sure about the 
> <html:checkbox> or the <html:text>
> 
> Does this code look ok, or is there something I have to change?
> 
> Thanks.
>                                           Tom
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 

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


Mime
View raw message