struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Markert <>
Subject Re: Problem with Map based form
Date Tue, 17 Jun 2003 13:47:40 GMT
Hallo Nadja,

  perhaps you have 2 forms in different scopes? Session and request?



NS> Hello everyone,

NS> I am having a weird error with one of my Map based forms. I have these
NS> fields in my form:

NS> <html:text property="value(getKostenstelle)"/>
NS> <html:text property="value(getBezeichnung)"/>

NS> And I have the corresponding get-/set-methods in my form bean:

NS> public void setValue(String key, Object value){
NS>   values.put(key,value);
NS>   LoggerSupport.logDebug("values: "+key+"->"+value.toString(),log);
NS> }

NS> public String getValue(String key){
NS>   String temp;
NS>   if(values==null){
NS>     return "";
NS>   }else if((temp = (String)values.get(key))==null){
NS>     temp = "";
NS>   }
NS>   return temp;
NS> }

NS> values is my Map and it is being initialized in the form's contructor.

NS> Now, I want to validate the date in my validate method. But when the
NS> programm reaches method TreeMap is empty. In fact, you can see I have
NS> inserted some debugging info (that get's written in my logging file) in my
NS> set-method. When I open my logging file those lines are nowhere to be found,
NS> meaning the set-method does not get called before the programm reaches
NS> validate. But as far as I know it should've been long called, or am I wrong?

NS> The funny thing is, I've been using Map based forms before and those worked
NS> just fine and I can't see what I am doing differently here...

NS> I'd be grateful for any kind of help with this.

NS> Greetings,
NS> Nadja

NS> ---------------------------------------------------------------------
NS> To unsubscribe, e-mail:
NS> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message