You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Larry Young <ly...@dalmatian.com> on 2003/05/15 02:33:22 UTC
ActionForm reset() method
Hello,
I posted this message last week, but it never showed up on the
list ...
I have an ActionForm who's data is dependent on the user's
profile. Different users have different options available to them. So my
ActionForm uses data from the SessionContext to determine the contents of
an ArrayList, which is rendered by my JSP using indexed tags. This
particular JSP display's editable data which the user is expected to update
and submit.
The problem occurs when the user takes too long to enter the
data. When they finally do "submit" the form, the session is long gone,
and I have no ability to reconstruct the ArrayList for Struts to
populate. This results in Struts displaying a lovely NullPointerException
stacktrace to my user.
There are one or two ugly solutions I can think of to solve this
problem, like constructing a huge ArrayList, bigger than will ever be
required, just to avoid the null pointer problem. What I was hoping for
was a way from the reset() method to terminate the data population activity
and send them to another page where they can re-login.
Thoughts, comments, suggestions??
--- thanks ---
Larry
--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org