struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadja Senoucci" <senou...@21st.de>
Subject Problem with Map based form
Date Tue, 17 Jun 2003 13:41:31 GMT
Hello everyone,

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

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

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

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

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

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

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

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

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

Greetings,
Nadja



---------------------------------------------------------------------
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