> 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