>I am trying to use the updateActionListener from Tomahawk, using Hermods >tomahawk 1.1.5 Snapshot xml for clay. > >But i get this exception: > >[18189 2007-04-13 >18:33:17,488](org.apache.myfaces.application.ApplicationImpl)**ERROR**{org.apach >e.myfaces.application.ApplicationImpl.createComponent:391} User: ->Undefined >component type override >[18198 2007-04-13 >18:33:17,497](org.apache.shale.clay.component.chain.CreateComponentCommand)**ERR >OR**{org.apache.shale.clay.component.chain.CreateComponentCommand.execute:166} >User: ->Cannot create Component renderId="464" jsfid="t:updateActionListener" >componentType="override" extends="t:updateActionListener" allowBody="null" >facetName="null" >javax.faces.FacesException: Undefined component type override > > >Hm according to the shale clay page, this componentType should be >possible. > >Whats missing here? >
You need to define the listener as a top-level component setting the component type to the fully qualified path to the action listener. <component jsfid="t:updateActionListener" componentType="org.apache.myfaces.custom.updateactionlistener.UpdateActionListener" .. ... </component... However, this won't work without further customizations because this action listener is statefull and has special value binding attributes. The JSP tag has to do some special processing [1]. You will need to create a custom handler to create the listener. There is an example in the sandbox for the Trinidad version of the same thing. First you will need to add a commons chains config file to the WEB-INF folder of your web app [2]. Add a catalog with the name "clayCustomizations". Add a chain with the name of "preprocessAddActionListener" the the catalog. <catalog name="clayCustomization"> <chain name="preprocessAddActionListener"> <command className="acme.tomahawk.CreateActionListenerCommand" /> </chain> </catalog> Next, create a commons chains command extending "org.apache.shale.clay.component.chain.CreateActionListenerCommand". Add the extra logic to handle the special attributes [3]. [1] http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/updateactionlistener/UpdateActionListenerTag.java?view=markup [2] http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/webapp/WEB-INF/chain-config.xml?view=markup [3] http://svn.apache.org/viewvc/shale/sandbox/shale-clay-trinidad/src/main/java/org/apache/shale/clay/component/chain/trinidad/CreateActionListenerCommand.java?view=markup >Torsten Gary