You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sqdf qsdf <po...@yahoo.fr> on 2004/10/28 11:22:02 UTC
Bug in Struts on backup actionForm?
Hi all!
When I add an ActionError in the validate method's
ActionForm, I don't have any problem, my form is
backup and when I come back to my JSP, I can see all
form's datas.
But when I add an ActionError in the execute method's
Action, and call saveError(), I loose all form's datas
when I come back to my JSP.
I tested the option redirect="false" but I don't know
why, the ActionForm is always reset at the end of the
execute method.
My Struts Config is like this :
<form-bean name="ContactForm"
type="com.xxxxx.gui.wif.directory.ContactForm"/>
<action path="/action/directory/createContact"
type="com.xxxxx.gui.wif.directory.CreateContactAction"
scope="request"
input="contactCreate"
name="ContactForm"
redirect="false">
<forward name="success"
path="contactCreate"/>
</action>
My ContactForm extends ValidatorForm and I use the
tiles to define the path contactCreate.
When I place this in my reset method :
System.out.println("RESET");
I can see in my logs :
RESET (before the execute method)
RESET (after the execute method)
The only one solution I founded that I save the form
in request in my Action when I create the actionError
:
if (form != null && mapping.getName() != null) {
request.setAttribute(mapping.getName(), form);
}
Every help is welcome!
Thanks!
Nicolas
Vous manquez despace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org