You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Chen, Dean (Zhun)" <De...@gs.com> on 2002/08/07 02:48:34 UTC
Trouble keeping DynaActionForm in session scope
Hi,
I'm having a bit of trouble keeping DynaActionForm in session scope. Maybe
I'm overlooking something simple, so any help would be appreciated.
What I'm trying to do:
1. User clicks on link which displays a table. The table content is held in
"cgdCollection". This step works fine.
2. One the display page, the user needs to be able to sort a column, he/she
clicks on this link
/dynacommongrid.do?actionMethod=sortMethod&sortOrder=Account
3. The CGDynaAction tries to obtain the cgdCollection object from the form,
but returns null pointer instead.
In the CGDynaAction, I have this:
cgdCollection = (AtlaswebDynaCollection)
cgdForm.get("cgdCollection");
In struts-config.xml, I have this:
<form-bean name="cgdForm"
dynamic="true"
type="org.apache.struts.action.DynaActionForm">
<form-property name="sortOrder"
type="java.lang.String"/>
<form-property name="cgdCollection"
type="AtlaswebDynaCollection"/>
</form-bean>
<action path="/dynacommongrid"
type="CGDynaAction"
name="cgdForm"
scope="session"
validate="false"
input="/jsp/error.jsp"
parameter="actionMethod">
<forward name="sortMethod"
path="/jsp/commongrid/dynacommongrid.jsp"/>
</action>
Any ideas?
Thanks,
Dean Chen
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>