Fórum

Liferay 7 - MVCAction vs StrutsPortletAction

Enrico Costanzi, modificado 6 Anos atrás.

Liferay 7 - MVCAction vs StrutsPortletAction

New Member Postagens: 21 Data de Entrada: 11/02/17 Postagens Recentes
Is it possible to override a Liferay MVC Portlet Action with a StrutsPortletAction?

I'm asking because there something I don't get in BaseStrutsPortletAction blade sample: the "/login/login" path in the is now mapped by an liferay LoginMVC*Command. So I don't understand if overriding the same path with a BaseStrutsPortletAction could bring to something.

From what I understood I can override the /login/login path only by providing a MVCActionCommand OSGi component with an higher ranking.
thumbnail
David H Nebinger, modificado 6 Anos atrás.

RE: Liferay 7 - MVCAction vs StrutsPortletAction

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Um, no, they are not the same thing.

Liferay 7 still uses limited struts 1 for handling internal routing of requests to internal action handlers; there's no form handling, no web page returns, heck no real UI at all in this implementation.

Separately, Liferay has migrated all of the portlets to use the Liferay 7 MVC framework that leverages OSGi for all of the routing, and building out a separate override module for the LoginMVC*Commands are necessary.

They are two completely different things and are used for different purposes.

In fact, for the most part there is zero need for a struts action override anymore because the struts actions all handle internal portal tasks, not portlet activities, and rarely would a customization need to touch any of these.







Come meet me at the 2017 LSNA!
Enrico Costanzi, modificado 6 Anos atrás.

RE: Liferay 7 - MVCAction vs StrutsPortletAction

New Member Postagens: 21 Data de Entrada: 11/02/17 Postagens Recentes
Thank you David. I Understend, actually we notices the reduced number of struts action.

Now I'm just wondering if the sample is still relevant. And, if it is, what is that supposed to overwrite? I don't find any BaseStrutsPortletAction anywhere in liferay-portal code.
thumbnail
Olaf Kock, modificado 6 Anos atrás.

RE: Liferay 7 - MVCAction vs StrutsPortletAction

Liferay Legend Postagens: 6396 Data de Entrada: 23/09/08 Postagens Recentes
The usecase for a struts-action plugin is: When you find something in Liferay that you desparately need to customize and it happens to be implemented as a struts-action: This is what you need to use. The sample shows you how, but it might indeed point to a nonexistent struts-action. You'll need to adopt to your usecase.