Cool, thanks Gary.

so the following

<catalog           name="clayCustomization">
 <chain           name="preprocessAddComponent">
   <command  className="org.apache.shale.usecases.rolodex.CustomCommand"/>
 </chain>
</catalog>

would execute CustomCommand before the creation of a component,
validator, etc?  I guess if I make CustomCommand a Filter then I would
get a hook to the postProcess method which would actually be executed
after the component, validator, etc is created?




On 11/17/05, Gary VanMatre <[EMAIL PROTECTED]> wrote:
> > Hey Gary,
> >
> > Yeah I thought about using the shapeValidator, but I want to make this
> > as unobtrusive as possible. What I mean by that is that I don't want
> > to have to add a special component to every page to take care of this.
> > I like using chain to do it, but I would need a hook like preprocess
> > chain in shale-core. I guess shale-core tries to find the preprocess
> > chain and if it does then executes it. I would need something like
> > this within the addComponent chain.
> >
>
> I added several preprocess commands for the creation of the component, 
> converter, validator and listeners.  You can register the new catalog 
> "clayCustomization" with the chains configuration resources in the web 
> deployment descriptor.
>
> example web.xml
>  <!-- Commons Chain Configuration Resources -->
>  <context-param>
>    <param-name>org.apache.commons.chain.CONFIG_WEB_RESOURCE</param-name>
>    <param-value>/WEB-INF/chain-config.xml, /WEB-INF/test.xml</param-value>
>  </context-param>
>
> example test.xml
> <catalog           name="clayCustomization">
>  <chain           name="preprocessAddComponent">
>    <command  className="org.apache.shale.usecases.rolodex.CustomCommand"/>
>  </chain>
> </catalog>
>
> > Ryan
> >
>
> Gary
>

Reply via email to