Fórum

Changing the View with request in JSF Portlets

thumbnail
Fahad v, modificado 9 Anos atrás.

Changing the View with request in JSF Portlets

Junior Member Postagens: 35 Data de Entrada: 14/07/14 Postagens Recentes
Hello,

does anyone know how to change the view in jsf portlet according to view
For example:
if my url is :
/website/blog?id=20 ---- i need to see the detail.xhtml
if my url is
/website/blog i need to see the view.xhtml


Can any one please help emoticon
thumbnail
Neil Griffin, modificado 9 Anos atrás.

RE: Changing the View with request in JSF Portlets

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Hi Fahad,

I recommend that you use the Liferay Friendly URL mechanism rather than putting request parameters like ?id=20 on the URLs.

You can see an example of that with a typical URL from the Liferay Faces Showcase:
liferayfaces.org/web/guest/showcase/-/component/alloy/button/general

The friendly-url-routes.xml descriptor defines the request parameter names associated with each part of the URL path.

Then, in your XHTML code, you conditionally include a Facelet composition using the ui:include tag. An example can be found in component.xhtml.

Kind Regards,

Neil
thumbnail
Fahad v, modificado 9 Anos atrás.

RE: Changing the View with request in JSF Portlets

Junior Member Postagens: 35 Data de Entrada: 14/07/14 Postagens Recentes
im using the primefaces components in liferay.
i can see in the example using alloy UI tags.
is it possible with primefaces tags ?
thumbnail
Neil Griffin, modificado 9 Anos atrás.

RE: Changing the View with request in JSF Portlets

Liferay Legend Postagens: 2655 Data de Entrada: 27/07/05 Postagens Recentes
Hi Fahad,

It should work equally well with PrimeFaces component tags.

Kind Regards,

Neil
thumbnail
Fahad v, modificado 9 Anos atrás.

RE: Changing the View with request in JSF Portlets

Junior Member Postagens: 35 Data de Entrada: 14/07/14 Postagens Recentes
Thanks neil