Joe Germuska wrote:
> Speaking of chains, given Ted's suggestion about just plugging in
> another Action class as part of the ForwardConfig -- if that were to
> be the case, I think I'd just be more interested in a
> Commons-Chain/Struts-Chain solution -- which might be better anyway,
> as it's more forward looking than any of my suggestions.

PILGRIM, Peter, FM wrote:

Does this mean that we have solved the hideous Action Chaining debate?
In theory an Struts Action could be refactored to be a type of ``Command'' and therefor Actions could be chained.

Ted Husted wrote:
I think the Chain package will make it easier for people to do the Right Thing. The ActionForm properties, and so forth, can be commuted to a Context, and the Context passed up to a Chain which can do whatever it is they want to do.

Just to check in ...


I've been refactoring an application that started out using the "page controller" type actions into an architecture that uses "view commands" instead, and it seems to be working well.

In cases where I want to forward directly to the page, I can use a single Command:

    <command
        name="summary"
        className="app.command.SummaryView" />

In cases where I need to do something else first, like look up a seed record or process an update, I can set up a Chain that executes the business operations first, and then runs the view command. For one "interesting" page, I have two chains running back to it, depending on which control is used:

    <chain
        name="summary_select_applicant">
        <command className="app.command.SummaryList" />
        <command className="app.command.SummaryView" />
    </chain>

    <chain
        name="summary_select_permit">
        <command className="app.command.Select" />
        <command className="app.command.SummaryList" />
        <command className="app.command.SummaryView" />
    </chain>

So, in places where I had "business" actions forward to "presentation" actions, I'm now back to having "command" actions forward straight to the server pages again. Life is good.

Ladies and gentlemen, I believe we've found the "missing link" =:)

-Ted.



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



Reply via email to