commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manfred Wolff <wo...@manfred-wolff.de>
Subject Re: [chain] how to delegate to a command?
Date Mon, 12 Jul 2004 18:27:01 GMT

Vic.

Hmmm. I think the "chain of responsibility" pattern is not made to 
configure the chains on the fly ;-). If you have a decision configure 
all chains that are envolved and let the commands  themself decide if 
they can fulfill the business logic or not.

If a command aaa has the desision to go either to command bbb or to 
command ccc configure both.

<chains>
  <chain name="single">
      <command className="org.strutsit.chain.aaa"/>
      <command className="org.strutsit.chain.bbb"/>
      <command className="org.strutsit.chain.ccc"/>
  </chain>
</chains>

Either command aaa can fill the context with the information which 
command has to follow (context.put("next", "ccc")); or the following 
command themself has the responsibility to fulfill the request, or not.

-Manfred


Vic Cekvenich wrote:

> I want to from one command create another command to go to?
>
> How?
> Right now I place the catalog in the context and then use that.
>
> Is there a better way?
>
> tia,
> .V
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message