To be quite honest, Matt, I really don't know enough about webwork to provide any thoughts on how chaining should be implemented...I can only say that it can be useful once implemented, and that opinion is based on the work I have done on JPublish. Sorry, I wish I could be of more help.
Sincerely, Anthony Eden > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > [EMAIL PROTECTED] > Sent: Thursday, May 02, 2002 4:58 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: [Webwork-user] feature input - [chaining actions] > > > k. I can buy that. Now to probe deeper. > > Lets use your validate logon action analogy. Lets say > your have the following defined for views: > > chain.action=logon.action,Chain > chain.success=chain-form.jsp > chain.error=chain-form.jsp > chain.input=chain-form.jsp > > logon.action=Logon > logon.error=login.jsp > logon.success=index.jsp > login.input=login.jsp > > You are on a page that posts to "chain.action". So, WW > sets context on logon.action and executes it. This > person is not login so the action returns "error", so > WW takes them to the login.error page. The person logs > in successfully so they are taking to ?(index.jsp). We > don't want them to go anywhere because we are not done. > We want to continue down the chain. > > So what do we do about logon.action? We could not have > a logon.success defined and take that as an indicator > to continue or have logon.success=null or something to > indicate to us to continue. But that would force us to > duplicate our micro action views all over the place. We > want logon.action to work in non-chain or standalone > situations. In a chain situation, it is different. > > So, one idea is if the action is in a chain, don't > continue down the chain until we receive "success". If > we receive "success", go to next action which is > "Chain". So, now we set context, execute, and go to the > appropriate view and we are done. > > The disadvantage with this is that we have hard coded > the dispatcher to look for a result of "success" from > action execution. But right now I can't think of any > other way. > > Comments? > > -Matt > > > > "Anthony Eden" wrote > > > > > The benefit of action chaining, as far as I am > concerned, is to promote action reuse. With chaining > you can make more > > fine-grained actions and then chain together those > fine-grained actions to create more complex behavior. > As an example, > > let's say you need to validate that a user is logged > in prior to executing something. You could create a > ValidateUser > > action and then reuse it throughout your application. > In addition, if you make a change in a fine-grained > action then > > your change is reflected anywhere that action is used > in a chain. > > > > This is just one example, and there may be ways to do > things like this already in WebWork which I am > unfamiliar with. > > In addition, there are others who believe that action > chaining is not necessarily a good thing, but > personally I find it > > to be very useful (which is why JPublish includes > "action chaining"). Finally, with the Servlet 2.3 API > you can have > > similar functionality using filters. Since WebWork > is supposed to be more then a web framework though, it > may be > > beneficial to avoid using servlet-specific features > such as this in a WebWork application. > > > > Sincerely, > > Anthony Eden > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED]]On > Behalf Of > > > [EMAIL PROTECTED] > > > Sent: Thursday, May 02, 2002 2:51 PM > > > To: [EMAIL PROTECTED] > > > Subject: [Webwork-user] feature input - [chaining > actions] > > > > > > > > > I'm looking at the feature "action chaining" and I > need > > > some input. Can someone give me a good scenario for > > > chaining actions? What are we trying to accomplish > here > > > that we cannot do now? Or how does it alleviate > present > > > headaches? Or how will it allow us to do something > we > > > can't do now? > > > > > > -Matt > > > > > > > > > > > > > _______________________________________________________________ > > > > > > Have big pipes? SourceForge.net is looking for > download mirrors. We supply > > > the hardware. You get the recognition. Email Us: > [EMAIL PROTECTED] > > > _______________________________________________ > > > Webwork-user mailing list > > > [EMAIL PROTECTED] > > > > https://lists.sourceforge.net/lists/listinfo/webwork-user > > > > > > > > > > _______________________________________________________________ > > > > Have big pipes? SourceForge.net is looking for > download mirrors. We supply > > the hardware. You get the recognition. Email Us: > [EMAIL PROTECTED] > > _______________________________________________ > > Webwork-user mailing list > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/webwork-user > > > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] > _______________________________________________ > Webwork-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/webwork-user > _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] _______________________________________________ Webwork-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webwork-user