Re: Clearing Action properties from ValueStack

2008-03-11 Thread Rushikesh Thakkar
Thanks a lot for giving me proper direction.
I solved it by changing the bean scope from default 'singleton' to
'prototype' as suggested in the struts2-spring-jpa-ajax tutorial at
http://struts.apache.org/2.0.11/docs/struts-2-spring-2-jpa-ajax.html

Thanks again..
-Rushikesh

On Mon, Mar 10, 2008 at 6:37 PM, Othon Reyes Sanchez [EMAIL PROTECTED]
wrote:

 * - In 2.0+ isn't the default scope singleton?*
 Yes, the deafault scope is singleton (Only one instance for the class ).
 You can change the scope fo your beans to request or session but also you
 nedd to add some configuration to your web.xml.

 Are you using ModelDriven interface?.



 On Mon, Mar 10, 2008 at 11:29 AM, Dave Newton [EMAIL PROTECTED]
 wrote:

  --- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
   Not doing much in the applicationContext.xml file:
  
   beans default-autowire=autodetect
   bean id=putMappArchiveObject
  
  class=no.bbs.webservice.mapp.client.web.action.PutArchiveObject
   /bean
   /beans
 
  - Is that an action definition?
  - What version of Spring?
  - In 2.0+ isn't the default scope singleton?
 
  Dave
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: Clearing Action properties from ValueStack

2008-03-10 Thread Adrian Ost

hi,
not sure if this is really what you're problem is about, but adding the 
parameter includeParams to the struts url-tag solved my problem of 
having the old value + my new value send on resubmitting.

greets,
adrian

Rushikesh Thakkar schrieb:

Hi Group,

Can anyone tell me how long is the value of Action Property held on the
ValueStack. I am asking this b'coz I am facing a problem:

Background:
My action has 4 members (and getter,setter for them). One of them is a POJO
with many properties. So my JSP has different fields for supplying values to
these properties (none of them is mandatory). Finally, I am printing the
values of these properties when I submit the form to Action.

*Actual Problem*:
At the time of re-submitting the form with different set of propeties, the
older property-values are still present. They show up in the sysouts. I have
also made sure to declare the members of the Action class using new operator
and no-argument constructor, but that too didn't help for this POJO.

Kindly help me out with this.

!-- Gentle Reminder: Still waiting for somebody to look at my previous
post. --

  






Re: Clearing Action properties from ValueStack

2008-03-10 Thread Adrian Ost

oh..forgot...set its value to 'none'

Adrian Ost schrieb:

hi,
not sure if this is really what you're problem is about, but adding 
the parameter includeParams to the struts url-tag solved my problem 
of having the old value + my new value send on resubmitting.

greets,
adrian

Rushikesh Thakkar schrieb:

Hi Group,

Can anyone tell me how long is the value of Action Property held on the
ValueStack. I am asking this b'coz I am facing a problem:

Background:
My action has 4 members (and getter,setter for them). One of them is 
a POJO
with many properties. So my JSP has different fields for supplying 
values to

these properties (none of them is mandatory). Finally, I am printing the
values of these properties when I submit the form to Action.

*Actual Problem*:
At the time of re-submitting the form with different set of 
propeties, the
older property-values are still present. They show up in the sysouts. 
I have
also made sure to declare the members of the Action class using new 
operator

and no-argument constructor, but that too didn't help for this POJO.

Kindly help me out with this.

!-- Gentle Reminder: Still waiting for somebody to look at my previous
post. --

  












Re: Clearing Action properties from ValueStack

2008-03-10 Thread mgainty
default scope you are using is short lived so implement the scope your
action needs with a scope interceptor
http://struts.apache.org/2.0.6/docs/scope-interceptor.html
and if you use a key param you will be able to access either Action
attribute via supplied 'key'
(provided you have setup the mutator and accessor in your Action classes)

Martin

- Original Message -
Wrom: OWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZ
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, March 10, 2008 8:12 AM
Subject: Clearing Action properties from ValueStack


 Hi Group,

 Can anyone tell me how long is the value of Action Property held on the
 ValueStack. I am asking this b'coz I am facing a problem:

 Background:
 My action has 4 members (and getter,setter for them). One of them is a
POJO
 with many properties. So my JSP has different fields for supplying values
to
 these properties (none of them is mandatory). Finally, I am printing the
 values of these properties when I submit the form to Action.

 *Actual Problem*:
 At the time of re-submitting the form with different set of propeties, the
 older property-values are still present. They show up in the sysouts. I
have
 also made sure to declare the members of the Action class using new
operator
 and no-argument constructor, but that too didn't help for this POJO.

 Kindly help me out with this.

 !-- Gentle Reminder: Still waiting for somebody to look at my previous
 post. --



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



Re: Clearing Action properties from ValueStack

2008-03-10 Thread Dave Newton
--- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
 Can anyone tell me how long is the value of Action Property held on the
 ValueStack. I am asking this b'coz I am facing a problem:

Normally an action is created for each request and pushed onto the stack.

Without knowing more about how your application is configured it will be hard
to say much more. 

Are you using Spring?

 *Actual Problem*:
 I have also made sure to declare the members of the 
 Action class using new operator

What does that mean exactly?

Dave


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



Re: Clearing Action properties from ValueStack

2008-03-10 Thread Rushikesh Thakkar
Yes, I am using Spring ObjectFactory.

On Mon, Mar 10, 2008 at 5:13 PM, Dave Newton [EMAIL PROTECTED] wrote:

 --- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
  Can anyone tell me how long is the value of Action Property held on the
  ValueStack. I am asking this b'coz I am facing a problem:

 Normally an action is created for each request and pushed onto the stack.

 Without knowing more about how your application is configured it will be
 hard
 to say much more.

 Are you using Spring?

  *Actual Problem*:
  I have also made sure to declare the members of the
  Action class using new operator

 What does that mean exactly?

 Dave


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




Re: Clearing Action properties from ValueStack

2008-03-10 Thread Rushikesh Thakkar
sorry, missed out the second question:

I mean, I have instantiated Action properties while declaring them.

public class PutArchiveObject extends ActionSupport implements SessionAware
{

private Map session;
private Head head = *new Head();*
private String parentObjectRef *= new String();*
private IndexDTO index *= new IndexDTO();*
 ...
}

On Mon, Mar 10, 2008 at 5:25 PM, Rushikesh Thakkar 
[EMAIL PROTECTED] wrote:

 Yes, I am using Spring ObjectFactory.


 On Mon, Mar 10, 2008 at 5:13 PM, Dave Newton [EMAIL PROTECTED]
 wrote:

  --- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
   Can anyone tell me how long is the value of Action Property held on
  the
   ValueStack. I am asking this b'coz I am facing a problem:
 
  Normally an action is created for each request and pushed onto the
  stack.
 
  Without knowing more about how your application is configured it will be
  hard
  to say much more.
 
  Are you using Spring?
 
   *Actual Problem*:
   I have also made sure to declare the members of the
   Action class using new operator
 
  What does that mean exactly?
 
  Dave
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: Clearing Action properties from ValueStack

2008-03-10 Thread Dave Newton
--- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
 Yes, I am using Spring ObjectFactory.

Okay.

Are you configuring your actions in the Spring config file? If so, *please*
include how they're being configured.

Dave


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



Re: Clearing Action properties from ValueStack

2008-03-10 Thread Rushikesh Thakkar
Not doing much in the applicationContext.xml file:

beans default-autowire=autodetect
 !--  similar declarations --

bean id=putMappArchiveObject class=
no.bbs.webservice.mapp.client.web.action.PutArchiveObject
/bean

 !--  similar declarations --
/beans


On Mon, Mar 10, 2008 at 5:50 PM, Dave Newton [EMAIL PROTECTED] wrote:

 --- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
  Yes, I am using Spring ObjectFactory.

 Okay.

 Are you configuring your actions in the Spring config file? If so,
 *please*
 include how they're being configured.

 Dave


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




Re: Clearing Action properties from ValueStack

2008-03-10 Thread Dave Newton
--- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
 Not doing much in the applicationContext.xml file:
 
 beans default-autowire=autodetect
 bean id=putMappArchiveObject

class=no.bbs.webservice.mapp.client.web.action.PutArchiveObject
 /bean
 /beans

- Is that an action definition?
- What version of Spring?
- In 2.0+ isn't the default scope singleton?

Dave


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



Re: Clearing Action properties from ValueStack

2008-03-10 Thread Othon Reyes Sanchez
* - In 2.0+ isn't the default scope singleton?*
Yes, the deafault scope is singleton (Only one instance for the class ).
You can change the scope fo your beans to request or session but also you
nedd to add some configuration to your web.xml.

Are you using ModelDriven interface?.



On Mon, Mar 10, 2008 at 11:29 AM, Dave Newton [EMAIL PROTECTED] wrote:

 --- Rushikesh Thakkar [EMAIL PROTECTED] wrote:
  Not doing much in the applicationContext.xml file:
 
  beans default-autowire=autodetect
  bean id=putMappArchiveObject
 
 class=no.bbs.webservice.mapp.client.web.action.PutArchiveObject
  /bean
  /beans

 - Is that an action definition?
 - What version of Spring?
 - In 2.0+ isn't the default scope singleton?

 Dave


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