Though I haven't given it a extensive testing, using document views that
point to other commands seems to work for me. Is this not sufficient?

<?xml version="1.0"?>

<maverick version="2.0" default-view-type="document"
default-transform-type="document">

 <commands>

  <command name="a">
   <controller class="com.foo.A"/>
   <view name="success" path="a.jsp"/>
   <view name="error" path="erra.jsp"/>
  </command>

  <command name="b">
   <controller class="com.foo.B"/>
    <!-- this view maps to another command-->
   <view name="success" path="a.m"/>
   <view name="error" path="errb.jsp"/>
  </command>

 <commands>
</maverick>

--jim

----- Original Message -----
From: "Aapo Laakkonen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 10, 2002 4:23 PM
Subject: RE: [Mav-user] ModelLifeTime / discard() not guaranteed


> > It's probably about time for another release, too.
> > There haven't been any major changes, just a handful
> > of little things, but it adds up.
>
> This proves one thing: Maverick is well designed and very mature
> framework.
>
> One thing comes to mind. I just throw this on the air. Have you thought
> about command chaining? And, if yes, what have you decided? What I mean
> about chaining is that you could build independend reusable commands
> with it. Or is it already possible? If yes, then how does it work?
> client side redirection is not what I'm looking for.
>
> Simple example:
>
> - User signs guestbook form
> - signGuestbook.m command is executed
> - signGuestbook command's Sign controller is called
> - Sign controller stores guestbook entry to db
> - Sign controller returns SUCCESS
> - SUCCESS maps to another command -
>   retrieveEntries (in this case not a view)
> - retrieveEntries.m command is executed
> - retrieveEntries command's Retrieve controller is called
> - Retrieve controller get's guestbook entries from database
> - Retrieve controller returns SUCCESS
> - SUCCESS maps to a view
> - View is displayed to User
>
> There is many things that need to be noted about this:
>
> How is the model for a view build in a command chain?
>
>   - The last command in chain builds it?
>   - Every command in chain can add itself or
>     something else in the model, but how?
>     - Following actions could somehow extend the model
>       (extensible Model interface or something like it)?
>   - Approach like the one in Webwork, i.e. ValueStack?
>   - Support for multiple models (?)
>   - When the model is build? And is the model that
>     is build in previous commands usefull in following ones?
>   - How to implement Model lifetime in a chain?
>   - Add your questions here!
>
> How the parameters are passed to commands in a chain?
>
>   - Every parameter is copied to every command if it
>     has specified property in a form bean or controller?
>   - Parameters are only passed to the first command?
>   - Can command that are prior other commands change
>     the parameters?
>   - Add your questions here!
>
> Other things:
>
>   - Should there be parameter with default value
>     that limits the number of commands that can be
>     in a chain to protect from infinite loops?
>     - Then throw an exception?
>   - Should we think about some Workflow engine integration?
>     - If yes, should we write documentation about it?
>   - Is this too much bloat?
>   - What happens when exceptions occurs in a chain?
>     - Should this framework care about exceptions?
>       I think that struts has something like this,
>       but I have not used it since v. 1.0.
>     - This thing is not releated to chaining itself,
>       but the general framework.
>   - Add your questions here!
>   - Is there some other approaches for this?
>     - Controller extending controller extending controller...
>       - super.perform()
>       - Not independend
>       - Not very reusable
>       - Problems with parameters (i.e. same name)
>     - Workflow engine? What do you recommend?
>     - Views could call multiple actions with different
>       parameters?
>
> What do you think?
>
> > I revised a bit of the documentation, too.
>
> Great!
>
> > Scott, Jim, a release of 2.1.2?
>
> Go for it! Althought I'm not Scott or Jim, :-).
>
>
> Kind Regards
> Aapo <b/>ungle Laakkonen
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:
> With Great Power, Comes Great Responsibility
> Learn to use your power at OSDN's High Performance Computing Channel
> http://hpc.devchannel.org/
> [INVALID FOOTER]



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
[INVALID FOOTER]

Reply via email to