This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes How reset Struts form? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How reset Struts form?" Watch "How reset Struts form?" New topic
Author

How reset Struts form?

Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
Hello guys,

I don't know how reset Struts form after submit.

Here is my form:


After submit of form is shows same page where is this form. But in form are still informations which I inserted in previous step.

Could anybody help me how reset the form? I want to use only Struts without javascript, etc.

I'm using Struts 2.3.4.1.

Thanks
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8839
    
    7

If you really want to, you could clear out the values in your action after processing them.
Think about the applications you use. In my experience the pattern is that there is a display page, maybe with line items or field names and values, with a link to a page to edit or add a line item. Once one submits the edits, the original page is displayed to indicate that changes have been made.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Honzak Troubak
Ranch Hand

Joined: Jan 11, 2013
Posts: 31
good idea, thank you
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How reset Struts form?
 
Similar Threads
s:url and javascript onclick submit
Dynamic forms with javascript
Uncehecking a checked property
resetting request object in Struts