Forums de discussion

Override PortletAction in Liferay 7

Thirumal Reddy, modifié il y a 7 années.

Override PortletAction in Liferay 7

Regular Member Publications: 216 Date d'inscription: 03/12/15 Publications récentes
Hi Guys,
How to Override PortletAction and RolesAdminPortlet
in Liferay 7.?

regards,
Thirumal.
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
Have you tried checking out the blade examples? They have one that fits your request: https://github.com/liferay/liferay-blade-samples/tree/master/liferay-gradle/blade.strutsportletaction.








Come meet me at the LSNA!
Thirumal Reddy, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Regular Member Publications: 216 Date d'inscription: 03/12/15 Publications récentes
Hi David,
I want override editRole method from RolesAdminPortlet.java class
i know how to override MCVAction and render command classes but i dont know how to override RolesAdminPortlet class
could you please give me some suggestion.

regards,
Thirumal.
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
Yeah, that's not possible. You'd have to create your own portlet to implement an override to a core method like that.






Come meet me at the LSNA!
Thirumal Reddy, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Regular Member Publications: 216 Date d'inscription: 03/12/15 Publications récentes
Hi David,
i didn't understand. could you please explain clearly.
thumbnail
David H Nebinger, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
there is no supported way to override an internal method of a class in a module, there is no supported "inhertitance" of modules that might allow you to replace a single method within the RolesAdminPortlet class.

your only option is going to be to create your own portlet which implements what you want, copying everything you need from the original module but it will still be your own portlet, not Liferay's.






Come meet me at the LSNA!
Thirumal Reddy, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Regular Member Publications: 216 Date d'inscription: 03/12/15 Publications récentes
Ok David.
If i create new portlet and i'll implement my requirements.
but even though by default liferay's method will be exceute.
what things i need to do to exceute newly created portlet methods insted of liferay's method.
Thirumal Reddy, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Regular Member Publications: 216 Date d'inscription: 03/12/15 Publications récentes
Hi David,
please give me replay.
with claer explanation.
I am new to OSGI technology.

thanks and regards,
Thirumal.
Thirumal Reddy, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Regular Member Publications: 216 Date d'inscription: 03/12/15 Publications récentes
Hi David,
How do i create a new portlet and do implement my requirement and default liferay implementation
and how to make my new portlet will work instade of Liferay's.
please give me replay david.

regards,
Thirumal.
Thirumal Reddy, modifié il y a 7 années.

RE: Override PortletAction in Liferay 7

Regular Member Publications: 216 Date d'inscription: 03/12/15 Publications récentes
Hi David,
I have created a new portlet and implemented all the requirements.
but it is not executing default liferay module only exceuting.?
how can i make module excute.?

regards,
Thirumal.
Fazalmahammad Babaria, modifié il y a 4 années.

RE: Override PortletAction in Liferay 7

New Member Publications: 16 Date d'inscription: 26/02/19 Publications récentes
Hiii Thirumal Reddy,
                 Have you got any solution for your problem because  i am also stucked in same situation and dont know how to override that.
Fazalmahammad Babaria, modifié il y a 4 années.

RE: Override PortletAction in Liferay 7

New Member Publications: 16 Date d'inscription: 26/02/19 Publications récentes
Thats right sir but in my case i am getting no service for EditLayoutsAction so for that i have to override This class but dont know how i can. 
thumbnail
Suresh Nimmakayala, modifié il y a 4 années.

RE: Override PortletAction in Liferay 7

Liferay Master Publications: 690 Date d'inscription: 18/08/04 Publications récentes
Fazalmahammad Babaria:

Thats right sir but in my case i am getting no service for EditLayoutsAction so for that i have to override This class but dont know how i can. 
you said i have stucked in same situation 
thread started as
"Hi Guys,
How to Override PortletAction and RolesAdminPortlet
in Liferay 7.?"

 what do you expect ?

create new thread and give more details with your problem

Thanks
Suresh