Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Michael Poznecki
How to forward the user to a new page in JSF?
19 de Março de 2009 06:58
Resposta

Michael Poznecki

Ranking: Expert

Mensagens: 301

Data de entrada: 10 de Dezembro de 2008

Mensagens recentes

Hello all,
I want to forward the user to a new user page after they click a button on my JSF portlet. I have seen many examples on forwarding the user to a new JSP or even a new XHTML, but I want to push them on to a new User Page which does not really have a page extension. In other words, I want to push them to '/web/guest/home'. Can someone help me with the syntax?

This is what I have tried in my faces-config.xml:

 1
 2<navigation-rule>
 3    <from-view-id>publisherForm.xhtml</from-view-id>
 4     <navigation-case>
 5        <from-outcome>submit</from-outcome>
 6        <to-view-id>/web/guest/home</to-view-id>
 7        <redirect/>
 8   </navigation-case>
 9 </navigation-rule>




But it does not seem to do anything.

Thanks,
Michael
lsli lsli
RE: How to forward the user to a new page in JSF?
11 de Janeiro de 2010 17:01
Resposta

lsli lsli

Ranking: Junior Member

Mensagens: 57

Data de entrada: 10 de Novembro de 2008

Mensagens recentes

Hi Michael,

Did you ever get a solution for this issue? I'm running into the same issue right now.
Oliver Bayer
RE: How to forward the user to a new page in JSF?
12 de Janeiro de 2010 01:58
Resposta

Oliver Bayer

Ranking: Liferay Master

Mensagens: 867

Data de entrada: 18 de Fevereiro de 2009

Mensagens recentes

Hi Michael,

afaik you have to define navigation rules in JSF in the faces-config.xml only if you submit a form (=calls an action). Only a hint but wouldn't it be easier to use something like the "<h:outputLink>" tag which generates a simple html link?
Link to the outputLink-tag reference

HTH Oli