Forums de discussion

Redirect inside a Portlet from one XHTML to another

Ralf Heydenreich, modifié il y a 11 années.

Redirect inside a Portlet from one XHTML to another

New Member Publications: 11 Date d'inscription: 10/11/09 Publications récentes
Hi all,
I've just grabbed through tons of discussion entries in this forum, but none of this helped me. I have an XHTML page which contains a commandLink:


<h:commandlink id="exminationmodul" value="exam modul" action="#{taskSelector.selectTask(2)}" />


Now, from the TaskSelector bean I return the string "select-topic", which should redirect me to another page. At this page are some more commandLinks. When I click on one of them, nothing happens because the viewId is the old one (from the former site). This you can see in the generated link, where facesViewIdRender points to the first page. Only at second click the command is executed properly (and then facesViewIdRender point to the right page).
How can I get this problem solved? How do I write the correct commandLink action?

TIA,
Ralf.
thumbnail
Vernon Singleton, modifié il y a 11 années.

Re: [Liferay Forums][Liferay Faces - English] Redirect inside a Portlet fro

Expert Publications: 315 Date d'inscription: 14/01/13 Publications récentes
Hello Ralf,

If you post a war file that reproduces this issue, I will try to take a
look at it.

- Vernon



On Wed, Mar 6, 2013 at 6:25 AM, Ralf Heydenreich from liferay.com <
forums@liferay.com> wrote:

> Hi all,
> I've just grabbed through tons of discussion entries in this forum, but
> none of this helped me. I have an XHTML page which contains a commandLink:
> 1
> 2<h:commandLink id="exminationmodul" value="exam modul"
> action="#{taskSelector.selectTask(2)}"/>
>
>
> Now, from the TaskSelector bean I return the string "select-topic", which
> should redirect me to another page. At this page are some more
> commandLinks. When I click on one of them, nothing happens because the
> viewId is the old one (from the former site). This you can see in the
> generated link, where facesViewIdRender points to the first page. Only at
> second click the command is executed properly (and then facesViewIdRender
> point to the right page).
> How can I get this problem solved? How do I write the correct commandLink
> action?
>
> TIA,
> Ral f.
>
>
> To view the thread, follow the link below:
>
> http://www.liferay.com/community/forums/-/message_boards/view_message/22343395
> --
> Thanks, Liferay.com Forums <http://http://www.liferay.com>
Ralf Heydenreich, modifié il y a 11 années.

RE: Re: [Liferay Forums][Liferay Faces - English] Redirect inside a Portlet

New Member Publications: 11 Date d'inscription: 10/11/09 Publications récentes
Hi all,
I've solved the problem with PrimeFaces. The p:commandLink tag behaves different than the h:commandLink. Even without explicit redirect the command navigation works. Therefore I think this thread to be solved.

Regards,
Ralf.