smartass
-----Original Message-----
From: Bradley Handy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 9:44 AM
To: Struts Users Mailing List
Subject: RE: jstl question
Accessors of java.util.Map implementations use a single parameter. Is
the instance variable behind the "valueNum" property an implementation
of java.util.Map (ie. HashMap,
org.apache.commons.collections.FastHashMap, etc)?
If it is, then Mark's suggestion needs one little tweak.
Change: ${whatever} -> ${whatever.key}
Where "key" is the java.util.Map key, under which, you wish to store
your parameter from your form.
Brad Handy
> -----Original Message-----
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 17, 2003 9:39 AM
> To: Struts Users Mailing List
> Subject: RE: jstl question
>
> I don't get it. Accessors for JavaBeans do not use parameters (public
> String getValueNum()); mutators use parameters (public void
setValueNum(
> String param ). Why are you passing an accessor a param argument?
>
> Nevertheless, if this were a real JavaBean, you would set and get its
> values
> in JSTL like this:
>
> // reference the tab library
> <@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
>
> // instantiate the bean in page scope
> <jsp:useBean id='whatever' class='myPackage.MyJavaBean'/>
>
> // set the property from the request parameter passed to the page
> <c:set target='${whatever}' property='ValueNum'
> value='${param.valueNum}'/>('
>
> // print the parameter value
> <c:out value='${param.valueNum}'/>
>
>
> Happy Hurricanes!
> Mark
>
> -----Original Message-----
> From: Richard Raquepo [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2003 12:10 AM
> To: Struts Users Mailing List
> Subject: jstl question
>
>
> i have a bean that has this gettter method
>
> ...
>
> public String getValueNum(String param){
> ....
> }
>
> ...
>
> using struts tag i can call it like:
> <bean:write name="bean" value="valueNum(test)"/>
>
> and it will works.
>
> now i can't seem to figure out how can i do that using jstl.
>
> i need your expert advice on this very simple problem that i can't
seem to
> hack.
>
> thanks
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]