struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: converting a struts bean call to EL/JSTL
Date Tue, 19 Sep 2006 20:49:07 GMT
Bob wrote:
> I have a map of ui controls passed to a JSP.  Each entry in the map contains
> a "label", "name", "value".  The key used in the map is the "name".  I
> iterate through as follows:
> 
> <TABLE>
>     <c:forEach var="entry"
> items="${requestScope[param.forName].uiControls}">
>         <TR>
>             <TD>
>                 <bean:write name='${param.formName}'
> property="uiCtrlLabel(${entry.key})"/>
>             </TD>
>             <TD>
>                 <html:text property="uiCtrlValue(${entry.key})" size="30"
> maxlength="2048"/>
>             </TD>
>         </TR>
>     </c:forEach>
> </TABLE>
> 
> This works, however I am trying to figure out how to make it work without
> using the bean:write tag.  Any ideas?  I've tried many options all of which
> fail.

How about ${requestScope[param.formName].uiCtrlLabel[entry.key]} ? For 
safely against cross-site-scripting attacks, of course, that should be 
wrapped in a <c:out/> tag.

L.


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


Mime
View raw message