Re: how to keep object from action to action

2007-10-08 Thread Zoran Avtarovski
Thanks Sami, I apologise. I know that there are a few different solutions around. We use a our own custom interceptor which works for us. My point was more that I think that action chaining is probably the feature of S2 I find most trying. I suspect that of the work would be in improving the

Re: how to keep object from action to action

2007-10-08 Thread Ted Husted
On 10/8/07, Zoran Avtarovski [EMAIL PROTECTED] wrote: My guess would be that it's being left to the authors of the various S2 books to deal with. There isn't any kind of master plan. We're all volunteers, and people contribute what they can, when they can, usually based on what we need to do

Re: how to keep object from action to action

2007-10-07 Thread Ted Husted
This is usually called action chaining * http://struts.apache.org/2.x/docs/action-chaining.html Experience shows that chaining should be used with care. If chaining is overused, an application can turn into spaghetti code. Be sure to ask yourself why you need to chain from Action1 to Action2.

Re: how to keep object from action to action

2007-10-07 Thread Zoran Avtarovski
Action chaining isn't just to access logic in two separate action classes, but is often necessary when intermediate input is required from the user, for example complex forms which need to be broken down into multiple pages, wizards if you like. Since Struts 1 we have been sticking the user

Re: how to keep object from action to action

2007-10-07 Thread Sami Dalouche
Hi, you should take a look at Spring Web Flow (http://www.springframework.org/webflow) and its Struts2 plugin (http://cwiki.apache.org/S2PLUGINS/spring-webflow-plugin.html). Regards, Sami Dalouche Le lundi 08 octobre 2007 à 15:03 +1000, Zoran Avtarovski a écrit : Action chaining isn't just to

RE: how to keep object from action to action

2007-10-04 Thread Jiang, Jane (NIH/NCI) [C]
If you use the Spring framework, you can define your object as Spring beans and have them injected to your action. -Original Message- From: ros [mailto:[EMAIL PROTECTED] Sent: Thursday, October 04, 2007 10:21 AM To: user@struts.apache.org Subject: how to keep object from action to

RE: how to keep object from action to action

2007-10-04 Thread ros
Yes, I use spring. I will describe question in details: Same situation my1.html -(mypojo.id)- action1.save -(mypojo)- action2.edit-(mypojo)- my2.jsp - my2.html action1 loads mypojo: class action1 { .. private mypojo; setMypojo().. getMyPojo() ... public String save () { mypojo =

RE: how to keep object from action to action

2007-10-04 Thread Jiang, Jane (NIH/NCI) [C]
should set the scope of your pojo to be request if that is what you want. The default is singleton. -Original Message- From: ros [mailto:[EMAIL PROTECTED] Sent: Thursday, October 04, 2007 11:32 AM To: user@struts.apache.org Subject: RE: how to keep object from action to action Yes, I

RE: how to keep object from action to action

2007-10-04 Thread ros
Yes, this is it. How to setup StrutsSpringObjectFactory as current? web.xml? struts.xml? Thanks. Jiang, Jane (NIH/NCI) [C] wrote: If you use org.apache.struts2.spring.StrutsSpringObjectFactory as your object factory, and you define mypojo in your action to match your bean id in the

RE: how to keep object from action to action

2007-10-04 Thread Jiang, Jane (NIH/NCI) [C]
: RE: how to keep object from action to action Yes, this is it. How to setup StrutsSpringObjectFactory as current? web.xml? struts.xml? Thanks. Jiang, Jane (NIH/NCI) [C] wrote: If you use org.apache.struts2.spring.StrutsSpringObjectFactory as your object factory, and you define mypojo in your