Foros de discusión

Changing the View with request in JSF Portlets

thumbnail
Fahad v, modificado hace 9 años.

Changing the View with request in JSF Portlets

Junior Member Mensajes: 35 Fecha de incorporación: 14/07/14 Mensajes recientes
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 hace 9 años.

RE: Changing the View with request in JSF Portlets

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
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 hace 9 años.

RE: Changing the View with request in JSF Portlets

Junior Member Mensajes: 35 Fecha de incorporación: 14/07/14 Mensajes recientes
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 hace 9 años.

RE: Changing the View with request in JSF Portlets

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
Hi Fahad,

It should work equally well with PrimeFaces component tags.

Kind Regards,

Neil
thumbnail
Fahad v, modificado hace 9 años.

RE: Changing the View with request in JSF Portlets

Junior Member Mensajes: 35 Fecha de incorporación: 14/07/14 Mensajes recientes
Thanks neil