You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Laurie Harper <la...@holoweb.net> on 2006/01/06 04:42:55 UTC

Custom NavigationHandler

I was just looking at implementing a custom navigation handler. I need 
to basically replace the standard implementation with my own to extend 
the semantics.

I thought I'd start with the MyFaces implementation and just tweak it to 
do what I need. But NavigationHandlerImpl depends on a bunch of other 
MyFaces implementation classes, including ones that represent the 
individual navigation rules/cases.

This leads me to suspect that there's no standard, portable way to 
implement a navigation handler that *replaces* the default one rather 
than just decorating it. Is that true, or are there portable equivalents 
to the implementation APIs that I can use to get at the application's 
navigation rules?

L.


Re: Custom NavigationHandler

Posted by Matthias Wessendorf <ma...@apache.org>.
Hey Laurie,

this might be interesting for you
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=179

-Matthias

On 1/5/06, Laurie Harper <la...@holoweb.net> wrote:
> Craig McClanahan wrote:
> > On 1/5/06, Laurie Harper <la...@holoweb.net> wrote:
> >> I was just looking at implementing a custom navigation handler. I need
> >> to basically replace the standard implementation with my own to extend
> >> the semantics.
> >>
> >> I thought I'd start with the MyFaces implementation and just tweak it to
> >> do what I need. But NavigationHandlerImpl depends on a bunch of other
> >> MyFaces implementation classes, including ones that represent the
> >> individual navigation rules/cases.
> >>
> >> This leads me to suspect that there's no standard, portable way to
> >> implement a navigation handler that *replaces* the default one rather
> >> than just decorating it. Is that true, or are there portable equivalents
> >> to the implementation APIs that I can use to get at the application's
> >> navigation rules?
> >
> > That's correct ... there is no standard API for getting to the navigation
> > rules configuration information (or the managed beans configuration
> > information for that matter).
>
> Mph, damn. I guess I can always re-parse the faces-config.xml (I only
> need to worry about my own navigation rules), though there's some
> overhead in having those rules processed a second time if I delegate to
> the parent nav handler when I don't find a match.
>
> I think for now I'll just tie myself to the MyFaces implementation and
> flag it as something I need to address if I ever need to switch back to
> the RI.
>
> Thanks for the tip,
>
> L.
>
>


-- 
Matthias Wessendorf

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

Re: Custom NavigationHandler

Posted by Laurie Harper <la...@holoweb.net>.
Craig McClanahan wrote:
> On 1/5/06, Laurie Harper <la...@holoweb.net> wrote:
>> I was just looking at implementing a custom navigation handler. I need
>> to basically replace the standard implementation with my own to extend
>> the semantics.
>>
>> I thought I'd start with the MyFaces implementation and just tweak it to
>> do what I need. But NavigationHandlerImpl depends on a bunch of other
>> MyFaces implementation classes, including ones that represent the
>> individual navigation rules/cases.
>>
>> This leads me to suspect that there's no standard, portable way to
>> implement a navigation handler that *replaces* the default one rather
>> than just decorating it. Is that true, or are there portable equivalents
>> to the implementation APIs that I can use to get at the application's
>> navigation rules?
> 
> That's correct ... there is no standard API for getting to the navigation
> rules configuration information (or the managed beans configuration
> information for that matter).

Mph, damn. I guess I can always re-parse the faces-config.xml (I only 
need to worry about my own navigation rules), though there's some 
overhead in having those rules processed a second time if I delegate to 
the parent nav handler when I don't find a match.

I think for now I'll just tie myself to the MyFaces implementation and 
flag it as something I need to address if I ever need to switch back to 
the RI.

Thanks for the tip,

L.


Re: Custom NavigationHandler

Posted by Craig McClanahan <cr...@apache.org>.
On 1/5/06, Laurie Harper <la...@holoweb.net> wrote:
>
> I was just looking at implementing a custom navigation handler. I need
> to basically replace the standard implementation with my own to extend
> the semantics.
>
> I thought I'd start with the MyFaces implementation and just tweak it to
> do what I need. But NavigationHandlerImpl depends on a bunch of other
> MyFaces implementation classes, including ones that represent the
> individual navigation rules/cases.
>
> This leads me to suspect that there's no standard, portable way to
> implement a navigation handler that *replaces* the default one rather
> than just decorating it. Is that true, or are there portable equivalents
> to the implementation APIs that I can use to get at the application's
> navigation rules?


That's correct ... there is no standard API for getting to the navigation
rules configuration information (or the managed beans configuration
information for that matter).

L.
>
>
Craig