Foren

of MVC liferay to JSF Liferay 6.2

josmar javier Alarcon Bothia, geändert vor 6 Jahren.

of MVC liferay to JSF Liferay 6.2

New Member Beiträge: 6 Beitrittsdatum: 11.02.13 Neueste Beiträge
Greetings, I am looking for problems to understand the JSF strategy of liferay, I have come to handle the Liferay MVC, all the events of the life cycles (serverResource, doview, etc.) were the ones that used for each one the necessary operations in the portlet states, in JSF I use a @ManageBean which is the manager of the calls portlet request but I am not clear if in the JSF portlets also can use the MVCPORTLET extensions classes or handle another type, would appreciate any help for understand more of this topic since the words have been seen in a single resource.

Thanks in advance
thumbnail
Kyle Joseph Stiemann, geändert vor 6 Jahren.

RE: of MVC liferay to JSF Liferay 6.2

Liferay Master Beiträge: 760 Beitrittsdatum: 14.01.13 Neueste Beiträge
Hi Josmar,
Rather than using the Liferay MVCPortlet, JSF portlets use GenericFacesPortlet which extends from GenericPortlet. When using JSF in portlets you can extend GenericFacesPortlet and override the functionality of certain methods (such as serveResource()) if necessary. For example, our JSF Showcase Portlet overrides processAction() and doView() to provide a demo of portlet:actionURL: https://github.com/liferay/liferay-faces-bridge-impl/blob/4.1.0/demo/jsf-showcase-portlet/src/main/java/com/liferay/faces/bridge/demos/portlet/ActionURLDemoPortlet.java.

It's probably better or easier to use JSF functionality to accomplish your goal unless it requires using GenericPortlet functionality directly. We won't be able to tell though unless we know more about your use case, so feel free to add that information.

If you want to learn more about how the Liferay Faces Bridge works with JSF in portlets, I recommend reading the Understanding the Liferay Faces Bridge docs.

- Kyle