掲示板

of MVC liferay to JSF Liferay 6.2

6年前 に josmar javier Alarcon Bothia によって更新されました。

of MVC liferay to JSF Liferay 6.2

New Member 投稿: 6 参加年月日: 13/02/11 最新の投稿
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
6年前 に Kyle Joseph Stiemann によって更新されました。

RE: of MVC liferay to JSF Liferay 6.2

Liferay Master 投稿: 760 参加年月日: 13/01/14 最新の投稿
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