Reputation: 2719
I have been reading a few posts saying that you can do the following:
Assuming this entry in faces-config.xml
..
<from-view-id></from-view-id>
<navigation-case>
<from-outcome>home</from-outcome>
<to-view-id>/xxx/index.xhtml</to-view-id>
</navigation-case>
..
an this String
in the action implementation:
return "home?param=1&faces-redirect=true";
This does not work for me. It gives me an error saying that it cannot match the navigation case:
Unable to find matching navigation case with from-view-id '/xxx/yyy.xhtml' for action 'home?faces-redirect=true¶m=1' with outcome 'home?faces-redirect=true¶m=1
On the other hand if I use the full view name it works just fine. Is this a bug or am I doing something wrong?
Upvotes: 0
Views: 711
Reputation: 3769
You're mixing implicit and explicit navigation.
With explicit navigation, your code is supposed to return an outcome only. Whether to redirect or not should be encoded in the XML rule, not in the outcome which you return from your bean.
But as far as I know, navigation rules have no real use anymore. Just delete them and return the view with the required parameters and redirect options and such from your bean. When you have more then 10 pages you'll be ready to pull your hair out when you use navigation rules. (Ironically, navigation rules were created to manage large amount of views, but exactly with a large amount of views they become completely and utterly unmanageable)
Upvotes: 1