Depending on the workflow, the ActionServlet may be calling reset and
repopulating the bean from the request. If this is what is happening,
one solution is to add a mutable property to the ActionForm, to tell the
setters to ignore additional input. See 

http://cvs.apache.org/viewcvs/jakarta-struts/contrib/scaffold/src/framework/main/org/apache/scaffold/http/SuperForm.java

for an example.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


yanming lu wrote:
> 
> Here is what i'd like to do:
> 
> page 1 has form with ID and NAME. The NAME field is hidden so it is blank.
> This form is configured as a java bean and set in the struts-config.xml
> file.
> 
> when user click the 'save' button, the id of the form is carried to next
> page, page 2. But in the between, I look at the dababase and find the name
> base on this id and call the setNAME() function to set the name value in the
> same form. But this NAME does not appear on the second form. Why?
> 
> yan
> 
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to