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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]