Is there some way to execute multiple actions with only one request?
Here is my views.properties file as an example (to show you what I'm
trying to do):

guestbook.action=guestbook.Guestbook
guestbook.success=guestbook/default.vm
guestbook.sign.action=guestbook.Guestbook!sign
guestbook.sign.success=guestbook.action

So the flow goes something like this:

User signs guestbook:

<form action="guestbook.sign.action">
...
</form>

CommandDriven Guestbook action's doSign() method gets called. When it
has done the work... let's execute guestbook.action, that is mapped to
guestbook.Guestbook (the same) class, but now the default doExecute()
method get's called (that retrieves guestbook entries). After this the
guestbook/default.vm file is displayed to the user.

The problem is that it doesn't seem to work as WebWork tries to find a
view when doSign()-method returns. It looks for /guestbook.action view
that does not exists.

I can propably use one of these:

1. use WebWork standard redirect action
   - needs client side redirection
   + URL gets updated and refreshing browser
     does not do anything weird (or re-post)

2. use #action and #execute velocity macros
   - ties velocity template to an action
   - I don't like the idea that client needs
     to know where to get the information, it
     should only know what information exists
     and use that
   + solves the problem

3. call doExecute() method from doSign() method
   - For me it is not elegant to call some method from
     totally unrelated method only to get valuestack
     populated
   - Makes refactoring harder as it ties different parts
     of software together
   + 1 line of code

So I'm requesting somekind of forwarding mechanism. Maybe something that
is just like the standard redirect action, but does the work on server
side.

Or have I missed or misunderstood something in WebWork... does it
already have this mechanism implemented?

Kind Regards
Aapo Laakkonen



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Webwork-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webwork-user

Reply via email to