This content has been marked as final.
Show 2 replies
-
1. Re: navigation doesn't work
aareshchanka Nov 16, 2010 12:56 PM (in response to vata2999)Check your server log if any JSF conversion errors happen, if so then action is never invoked and navigation not executed.
Try to add
<h:messages>
to the page and see wats happening.
Does your statefull bean has @Name annotation?
Paste more code please.
-
2. Re: navigation doesn't work
vata2999 Nov 17, 2010 6:40 AM (in response to vata2999)Hi Alexandr,
i face something weird, when i use this code in pages.xml redirection works fine but in investor.page.xml code that i mentioned above doesn't workpages.xml
<page view-id="*"> <action execute="#{identity.logout()}" if="#{identity.loggedIn and empty identity.credentials.username}" /> <navigation from-action="#{identity.logout}"> <rule if-outcome="home"> <end-conversation /> <redirect view-id="/home.xhtml" /> </rule> </navigation> <navigation from-action="#{investorAction.registerInvestor}"> <end-conversation/> <redirect view-id="/movieList.xhtml"></redirect> </navigation> </page>
investorActionBean.java
@End public String registerInvestor() { entityManager.persist(investor); entityManager.flush(); log.info("Investor Registered Successfully And end conversation"); facesMessages.add("\u0633\u0631\u0645\u0627\u064a\u0647 \u06af\u0630\u0627\u0631 \u062b\u0628\u062a \u0634\u062f");//sarmayegozar sabt shod return "registered"; }
PS : investor registered succefully and i've got facesmessage but page does not redirect