You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Matt Conway <co...@tripadvisor.com> on 2005/03/24 23:49:09 UTC

navigation component

Hi,

I've noticed a couple of issues with the x:*navigation components, and 
was wondering if anyone had a solution:

1) If I go to another page (which also has a commandNavigation link) via 
some other action like a commandLink, the active commandNavigation does 
not get updated.
2) The URL in the location bar reflects the last page navigated to 
rather than the current one.

Thanks,

Matt


Re: navigation component (or POSTs in JSF)

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Matt,

also in short ;)

In JSF everything is a POST,
that is because of JSF is restoring the component tree
from the view that creates a page.

If you use GET, it means that you give up any possibility
of component tree restoring.

HTH,
Matthias

Matt Conway wrote:
> Matthias Wessendorf wrote:
> 
>> in short to 2) that is *normal* in JSF
> 
> 
> Strange - if you feel like it could you (or someone else) explain why 
> this is so I can get a better understanding of JSF internals?  I assume 
> this is something that will addressed in future specs?  It just doesn't 
> seem right that something so basic being broken is considered normal.
> 
>> use <redirect/> inside of your navigation rules
>> and you'll see the *right* page.
> 
> 
> Thanks - I tried this and while it does show the right page, now the 
> active navigation entry is no longer higlighted!
> 
>>> 1) If I go to another page (which also has a commandNavigation link) 
>>> via some other action like a commandLink, the active 
>>> commandNavigation does not get updated.
>>> 2) The URL in the location bar reflects the last page navigated to 
>>> rather than the current one.
>>

Re: navigation component

Posted by Matt Conway <co...@tripadvisor.com>.
Matthias Wessendorf wrote:

> in short to 2) that is *normal* in JSF

Strange - if you feel like it could you (or someone else) explain why 
this is so I can get a better understanding of JSF internals?  I assume 
this is something that will addressed in future specs?  It just doesn't 
seem right that something so basic being broken is considered normal.

> use <redirect/> inside of your navigation rules
> and you'll see the *right* page.

Thanks - I tried this and while it does show the right page, now the 
active navigation entry is no longer higlighted!

>> 1) If I go to another page (which also has a commandNavigation link) 
>> via some other action like a commandLink, the active 
>> commandNavigation does not get updated.
>> 2) The URL in the location bar reflects the last page navigated to 
>> rather than the current one.
>


Re: navigation component

Posted by Matthias Wessendorf <ma...@matthias-wessendorf.de>.
Matt,

in short to 2) that is *normal* in JSF

use <redirect/> inside of your navigation rules
and you'll see the *right* page.

HTH,
Matthias

Matt Conway wrote:
> Hi,
> 
> I've noticed a couple of issues with the x:*navigation components, and 
> was wondering if anyone had a solution:
> 
> 1) If I go to another page (which also has a commandNavigation link) via 
> some other action like a commandLink, the active commandNavigation does 
> not get updated.
> 2) The URL in the location bar reflects the last page navigated to 
> rather than the current one.
> 
> Thanks,
> 
> Matt
>