struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kibo <tomasjur...@gmail.com>
Subject Re: Submit Success and false
Date Tue, 02 Dec 2008 12:06:44 GMT

Before return from Action class set dataObject to null.

public MyAction{
   private DataObject myDataObject;

   //something code

public String execute(){
    myDataObject = null;
   return "success";
}


public getMyDataObject(){
    return myDataObject;
}

}




mthalis wrote:
> 
> After entering data to the form, if it success, it will redirect to the
> same page. When it comes to that page the entered data are still the same.
> I want to clear those data from my form. But if it fails i want to remain
> my data as it is. How can i do it?
> this is my part of the struts-config.xml page.
> <action
>       attribute="userDataEnterForm"
>       input="admin.create.page"
>       name="userDataEnterForm"
>       path="/userDataEnter"
>       scope="request"
>       type="com.gad.struts.action.UserDataEnterAction">
>       <forward name="success" path="admin.create.page" />
>       <forward name="failure" path="admin.create.page" />
>     </action>
> 


-----
Tomas Jurman
Czech Republic
-- 
View this message in context: http://www.nabble.com/Submit-Success-and-false-tp20790660p20790810.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message