Resetting a session-scoped ActionForm member value
I had a session-scoped session form and when a user clicks on a button, I wanted the value to be reset. I tried to do something like
myForm.setValue("");
but it didn't do the job for some reason. Of course, I'm doing the usual struts way of getting the form by casting the ActionForm down to my specific type. It seems that overrding the reset() method was a more effective way in my case... The reset method has the signature
public void reset(ActionMapping mapping, HttpServletRequest request) {
//reset your fields here
}
This is basic stuff, but sometimes when you get to do more advanced things with your tools we often neglect the most basic of things...