You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by DHarty <ha...@db.erau.edu> on 2001/07/03 19:48:01 UTC

html:select in a session form

I have a form that is used in a session scope.

It has a boolean attribute (grant) that is set in an <html:form> by a
<html:select/> item.

I had to put the form in session scope so that it didn't get erased as it
was passed from one step to the other.

The problem is that every time ActionServlet passes the form it called the
forms reset method and erased my data.
SO, I put code in the reset method of the form to check  if the scope was
session:

 	public void reset(ActionMapping mapping, HttpServletRequest request)
	 {
		if(!"session".equals(mapping.getScope()))
		{
		    this.grant = false;
			...
		}
	}

However, when If I unselect the select button, the boolean grant doesn;t get
unset.  I can't pull the "reset"ing of grant out of the above code block,
because then it will get set to false everytime I submit a page.

This is begging to get bothersome!

D