struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Norman <james.nor...@perceptive.com>
Subject RE: Very simple and URGENT Tag question - Please Help
Date Tue, 03 Jun 2003 16:15:23 GMT
If you placed a Map in the context you can reference items in the Map by
the key.  Example would be to place a Map with a key of "ID" and some
value into context.  You can reference the value by calling 
<c:out value="${reference.ID}" />.  This is useful when you can't write
a bean.


On Tue, 2003-06-03 at 09:41, Chen, Gin wrote:
> btw this question was answered on the JSTL (Taglibs) list.
> I just gave a recap of the answer. If you want a more thorough explanation
> you can find it in the archives.
> -Tim
> 
> -----Original Message-----
> From: Chen, Gin [mailto:Gin.Chen@NielsenMedia.com]
> Sent: Tuesday, June 03, 2003 11:35 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Very simple and URGENT Tag question - Please Help
> 
> 
> since the collection in your case is not accessible except via a method that
> requires a parameter you can not do this using just jstl or even struts.
> the best way to do it is to expose your collection with a getXXX method.
> That way the syntax you used will work.
> JSP 2.0 *should* solve your problem though. It will allow for you to invoke
> methods.
> -Tim
> 
> -----Original Message-----
> From: Renato Romano [mailto:r.romano@set-network.com]
> Sent: Tuesday, June 03, 2003 11:33 AM
> To: 'Struts Users Mailing List'
> Subject: Very simple and URGENT Tag question - Please Help
> 
> 
> I have a bean with an indexed property, that is myBean.getItem(int i). I
> can't find a way to access that property, using struts, struts-el nor
> jstl. I tried the following:
> 
> <c:out value=${mybean.item[ind]}/>
> 
> Where ind is the indexId attribute of an ordinary logic:iterate struts
> tag. (and c is the prefix for the core jstl tag downloaded from jakarta)
> Where Am I wrong ?
> Thanks
> 
> Renato
> 
> ____________________________________
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
> 
> e-mail: r.romano@set-network.com
> Tel.:   010 2712603
> _____________________________________
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> ---------------------------------------------------------------------
> 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