re: Removing nested bean collections in session scope.......

2003-04-04 Thread Ted Husted
It sounds like the ActionForm is in session scope (the default) and that 
there is a reference to the other collections on the ActionForm.

You may also need to dispose the ActionForm after resetting the 
collection, something like

request.getSession().set(myActionForm,null);

-Ted.

--
Ted Husted,
Struts in Action http://husted.com/struts/book.html


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Removing nested bean collections in session scope.......

2003-04-03 Thread apachep2
I have had this issue before. In your next action, remove mapping to the
ActionForm in your struts-config.xml.

-Original Message-
From: Al Willingham [mailto:[EMAIL PROTECTED] 
Sent: April 3, 2003 12:47 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Removing nested bean collections in session scope...

Hi,

Thanks for considering this...

I'm really stumped. I have several layers of collections, ie, a nest of
beans inside a nested bean in an actionForm with session scope. When I
am finished with the collections, I call my own reset method and set the
top level collection to null. I am not overriding the default reset.

I assume that if I set the top level collection to null, that there is
no longer a reference to the other nested collections and they are
garbage collected.

When I re-use the actionForm within the same session, the collections
that were nested are still in session scope and reappear. But, the
collection that I set to null is null.

I am sure I am getting the correct session bean because I check for an
attribute with a unique value before and after I call my reset.

I would really appreciate any insight or suggestions.

Thanks
Al

-- 
Al Willingham [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Removing nested bean collections in session scope.......

2003-04-03 Thread Al Willingham
If I remove the mapping to my actionForm, I get an error indicating that
my jsp cannot retrieve definition for form bean null. Do I need to
usebean scope = session??

My mappings are:

First Mapping..

 action path=/Operator/network parameter=TEST
type=com.qualcomm.wirelessdevices.controller.OperatornetworkAction
  scope=session name=operatornetworkForm validate=false 
  forward name=success path=manager.Operator.networksummary/
  forward name=cancel redirect=true path=/do/Operator/list/
/action

Second Mapping
action path=/Operator/networkdetails parameter=NETDETAIL
type=com.qualcomm.wirelessdevices.controller.OperatornetworkAction
  scope=session name=operatornetworkForm validate=false 
  forward name=success path=manager.Operator.networksummary/
  forward name=successfulmanuf path=/do/Operator/list/
  forward name=cancel redirect=true path=/do/Operator/list/
/action



Changed second mapping to.

action path=/Operator/networkdetails parameter=NETDETAIL
type=com.qualcomm.wirelessdevices.controller.OperatornetworkAction
  forward name=success path=manager.Operator.networksummary/
  forward name=successfulmanuf path=/do/Operator/list/
  forward name=cancel redirect=true path=/do/Operator/list/
/action



On Thu, 2003-04-03 at 10:24, apachep2 wrote:
 I have had this issue before. In your next action, remove mapping to the
 ActionForm in your struts-config.xml.
 
 -Original Message-
 From: Al Willingham [mailto:[EMAIL PROTECTED] 
 Sent: April 3, 2003 12:47 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Removing nested bean collections in session scope...
 
 Hi,
 
 Thanks for considering this...
 
 I'm really stumped. I have several layers of collections, ie, a nest of
 beans inside a nested bean in an actionForm with session scope. When I
 am finished with the collections, I call my own reset method and set the
 top level collection to null. I am not overriding the default reset.
 
 I assume that if I set the top level collection to null, that there is
 no longer a reference to the other nested collections and they are
 garbage collected.
 
 When I re-use the actionForm within the same session, the collections
 that were nested are still in session scope and reappear. But, the
 collection that I set to null is null.
 
 I am sure I am getting the correct session bean because I check for an
 attribute with a unique value before and after I call my reset.
 
 I would really appreciate any insight or suggestions.
 
 Thanks
 Al
-- 
Al Willingham [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]