Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF navigation problems.

 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I´m new at the forum, as I am new to JSF.
I didn´t like the navigation rules on faces.config no JSF.

I read somewhere that in JSF 2.0 ou 2.1 don´t know, that i don´t need
to specify the navigation rules for simples navigation.. Ex.:



and the framework will look for
index.xhtml
[and other extensions] on the dir.


Well, i´m trying to use it on my abstract controller where I have:

view/grupo/index.xhtml


and in my abstract controller - grupoController:



the problem is that i can´t seem to navigate
Am I commiting a sin ?

thank you


--EDIT:

Forgot the tell you the errors... Well, I keep getting this on my view:

Warning: This page calls for XML namespace declared with prefix br but no taglibrary exists for that namespace.
Unable to find matching navigation case with from-view-id '/view/grupo/index.xhtml' for action '#{grupoController.actionEdit}' with outcome 'view/grupo/form'Unable to find matching navigation case with from-view-id '/view/grupo/index.xhtml' for action '#{grupoController.actionEdit}' with outcome 'view/grupo/form'
The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within <h:form>The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within <h:form>
Warning: This page calls for XML namespace declared with prefix br but no taglibrary exists for that namespace.
Unable to find matching navigation case from view ID '/view/grupo/index.xhtml' for outcome 'view/grupo/index'Unable to find matching navigation case from view ID '/view/grupo/index.xhtml' for outcome 'view/grupo/index'


And I tried navigation on the menu, also didn´t work:

CODE


ERROR
Warning: This page calls for XML namespace declared with prefix br but no taglibrary exists for that namespace.
Unable to find matching navigation case from view ID '/view/grupo/index.xhtml' for outcome 'view/grupo/index'Unable to find matching navigation case from view ID '/view/grupo/index.xhtml' for outcome 'view/grupo/index'
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really should fix this:


Apparently you have an "xmlns:br" somewhere in your View Definition (xhtml), but if there's a taglibrary for that namespace, it's not installed properly.

Your navigation problem, I think, is because you specified ""view/grupo/index" when you were already at the View whose URL was view/grupo/index. That means that the effective destination view would have been ""view/grupo/index/view/grupo/index" because you used a relative path. You should have specified an absolute path in such case:


Or a proper relative path:


Note that NO navigation will occur unless the action actually executes. If there are controls on the form that failed to validate, the action processing phase of the JSF lifecycle is suppressed.
 
Marco Noronha
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:You really should fix this:


Apparently you have an "xmlns:br" somewhere in your View Definition (xhtml), but if there's a taglibrary for that namespace, it's not installed properly.


I can´t find any page that has xmlns:br


Can you help me find? I´ll show you all of my pages declarations:





Tim Holloway wrote:

Your navigation problem, I think, is because you specified ""view/grupo/index" when you were already at the View whose URL was view/grupo/index. That means that the effective destination view would have been ""view/grupo/index/view/grupo/index" because you used a relative path. You should have specified an absolute path in such case:



Yeah, i really forgot that! But still, its not working ...
when i click on edit... it doesn´t go to the right page.

let me show you how I´m trying to navigate, maybe you have a better solution.





thanks for everything so far!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic