struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nadja Senoucci <Nadja.Senou...@zmnh.uni-hamburg.de>
Subject Re: Form bean is not stored in request
Date Mon, 07 Jul 2003 11:49:04 GMT
Hello,

>This is definitely the problem.  What properties are you trying to
>set?

I have two map backed fields in form. Since they can actually exists
repeatedly I am building the name in my .jsp and am displaying this as
follows:

<tr bgcolor="#FFFFFF"> 
          <% String fname = "field(searchfield"+(counter)+")";
		     String pname = "parameter(searchparam"+(counter)+")";%>
          <td> <html:select property="<%=fname%>"> 
            <html:optionsCollection property="searchFields" value="value"
label="label"/> 
            </html:select></td>
          <td><html:text property="<%=pname%>"/></td>
        </tr>
        <% counter++;
   }while(counter<=number); %>

So, the fields should be set via setField(String key, String value) and
setParameter(String key, String value):

public void setField(String key, String value){
	LoggerSupport.logDebug("setField(): key: "+key+", value: "+value,log);
	this.fields.put(key,value);
	LoggerSupport.logDebug("setField(): sind die Daten auch in der Map?
"+(this.fields.get(key)==null?"Nein":"Ja "+this.fields.get(key)),log);
}

public void setParameter(String key, String value){
	LoggerSupport.logDebug("setParameter(): key: "+key+", value: "+value,log);
	this.params.put(key,value);
	LoggerSupport.logDebug("setParameter(): sind die Daten auch in der Map?
"+(this.params.get(key)==null?"Nein":"Ja "+this.params.get(key)),log);
}

The Maps are being initialzed in SuchenForm's contructor:

public SuchenForm(){
	fields = new TreeMap();
	params = new TreeMap();
	cnt = new Integer(1);
}

Greetings,
Nadja

---------------------------------------------------------------------
Nadja  Senoucci
Universitaet Hamburg
Zentrum für Molekulare Neurobiologie
Service-Gruppe EDV
Falkenried 94
20251 Hamburg
Germany
Tel.:040 - 428 - 03 - 6619
Fax.:040 - 428 - 03 - 6621


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