struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jain, Shilpi" <Shilpi.J...@ind.xerox.com>
Subject RE: formBean setters not called on form submitting
Date Wed, 26 Mar 2003 09:10:30 GMT
I have the same problem. The only setter that is invoked is that related to
the select property. In your case it would be setAvailables2() and
setSelected2() and that too only if they are String[].

Regards
Shilpi

-----Original Message-----
From: Daniel Blázquez [mailto:danbqzz@terra.es] 
Sent: Wednesday, March 26, 2003 2:09 PM
To: struts-user@jakarta.apache.org
Subject: formBean setters not called on form submitting

Hi everybody:

I have a form bean with two lists and a html-javascript list-selector gizmo
as seen in tiles exaples (for choosing portal tiles and menu customization,
tiles-documentation/examples/myPortalSettings.jsp).

In filling time, everything ok, the options are displayed. But in saving
time, when html form values are saved in the formBean object, my list values
are not saved.

The two lists are: 

<html:select property="availables2" multiple="true" size="10">
   <html:options property="availables" labelProperty="availablesLabels"/>
</html:select>

<html:select property="selected2" multiple="true" size="10">
   <html:options property="selected" labelProperty="selectedLabels"/>
</html:select>

And the bean methods:

public void setAvailables2(String array[]){
   availablesVector.copyInto(array);
}

public void setSelected2(String array[]){
   selectedVector.copyInto(array);
}

The most extrange thing is that i have placed a trace in these setters
(appending something to another field that works ok) and i have noticed that
those methods are not called ever.

Does somebody see any problem in my setters or in the form? when are setters
methods efectively called when submitting a form?

any help will be very thanked, Dani (Spain)




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