struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaƫl di Cicco <raphael.dici...@atosorigin.com>
Subject Re: Using map backed forms beans
Date Mon, 01 Dec 2003 13:52:44 GMT
I think you can't...
if you want to display name, then you need to have a getName() and setName()

----- Original Message ----- 
From: "Antony Paul" <antonypaul24@hotmail.com>
To: "struts" <struts-user@jakarta.apache.org>
Sent: Monday, December 01, 2003 11:36 AM
Subject: Using map backed forms beans


> Hi,
>     When I use an ActionForm which have a HashMap to store values as
> specified in chapter 4 of the users guide, the name of the text field is
not
> properly displayed. My code is given below.
>
> ActionForm
>
> private Map map = new HashMap();
>  public void setMap(String key,Object value){
>   map.put(key,value);
>  }
>  public Object getMap(String key){
>   return map.get(key);
>  }
>
> in JSP i use this coding.
>
> <html:text property="map(name)" size="15" maxlength="25" title="User ID"/>
>
> When it is displayed on browser the name is displayed as map(name). I want
> it to be just name. (It is simple example. I need dynamic generation) How
to
> do it.
>
> Antony Paul.
>
> ---------------------------------------------------------------------
> 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