On 8/23/06, Laurie Harper <[EMAIL PROTECTED]> wrote:
I have a requirement to register a custom NavigationHandler
implementation at the bottom of the delegation stack, rather than at the
top as happens when registering through WEB-INF/faces-config.xml.
Basically, I need to make sure that delegating navigation handlers, such
as Shale's DialogNavigationHandler, or the equivalent in Trinidad,
delegate to my nav handler, *not* the other way around. Basically, my
nav handler needs to replace MyFaces' default implementation, with the
normal registration of delegating nav handlers from faces-config.xml
files wrapping that.

I know JSF (at least prior to 1.2, anyway) doesn't provide a mechanism
to achieve this; does MyFaces? I know I can modify the
standard-faces-config.xml file bundled in myfaces-impl.jar to get what I
want (actually, that sets my nav handler up as the first delegating
handler above MyFaces', but that's 'good enough' for my purposes). What
i'd like, though, is a config option that would have the same effect.

Alternatively, is there any other mechanism I can use to achieve this,
MyFaces-specific or otherwise?

you can put your nhImpl in a jar named zzzzzzz.jar
and register the nh inside its' faces-config.xml


doing something like this in a ServletContextListener is probably not working,
b/c no rule how to specify the order (MyFaces has a CxtListener too)

<hack>
   NavigationHandler nh =
FacesContext.getCurrentInstance().getApplication().getNavigationHandler();
   NavigationHandlerImpl myNH = new NavigationHandlerImpl(nh);

   
FacesContext.getCurrentInstance().getApplication().setNavigationHandler(myNH);

</hack>


Thanks,

L.




--
Matthias Wessendorf

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to