Forums de discussion

Changing the View with request in JSF Portlets

thumbnail
Fahad v, modifié il y a 9 années.

Changing the View with request in JSF Portlets

Junior Member Publications: 35 Date d'inscription: 14/07/14 Publications récentes
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, modifié il y a 9 années.

RE: Changing the View with request in JSF Portlets

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
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, modifié il y a 9 années.

RE: Changing the View with request in JSF Portlets

Junior Member Publications: 35 Date d'inscription: 14/07/14 Publications récentes
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, modifié il y a 9 années.

RE: Changing the View with request in JSF Portlets

Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Fahad,

It should work equally well with PrimeFaces component tags.

Kind Regards,

Neil
thumbnail
Fahad v, modifié il y a 9 années.

RE: Changing the View with request in JSF Portlets

Junior Member Publications: 35 Date d'inscription: 14/07/14 Publications récentes
Thanks neil