On 5/4/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
On 5/4/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> How exactly can I set the chain for a particular request?

Stupid me, "catalog" and "command" attributes of "action", of course.
Still, this choice is made declaratively on a mapping level. What if I
wanted to make it programmatically?

Well, there were some dumb questions I asked in the first message of
this thread :-)

Now a less stupid question: how chain works with dispatch actions? A
command has only one execute() method, so we are back to what we had
in bare Action class, only less parameters. To have dispatching
features, one either should use either a dispatch action "on top" of
the chain, or should process and dispatch request manually in
Command.execute() method.

Wolfgang Gehner from infonoia.com writes:

"We are fans of grouping *related* actions in one action class, one
thing that the DispatchAction
(org.apache.struts.action.DispatchAction) allows. For example, we
consider all CRUD actions on a bean as related actions. So what we did
is create a BaseCmd class that works similiarly to DispatchAction;"
[1]

He does not explain how they implemented the dispatching functions,
but apparently they did some proprieatery coding for Command.

So if one wants to ditch Action class completely, he would have to
implement dispatching functions. Not that I think that Action class is
evil, I like Action class and its servlet API - related parameters.

I was thinking about implementing dispatching functions in base
Action, but now when we have Command as well, maybe it makes sense to
utilize ActionDispatcher that would dispatch to methods of either
Command or Action?

Michael.

[1] http://infonoia.com/en/content.jsp?d=inf.05.06

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

Reply via email to