Fórumok

How to modify Polls portlet

Abhi M, módosítva 11 év-val korábban

How to modify Polls portlet

Junior Member Bejegyzések: 28 Csatlakozás dátuma: 2012.02.29. Legújabb bejegyzések
Hi,

I need to modify Polls portlet and I dont want to write ext-plugin. Is it possible with hook. Polls portlet is using StrutsPortlet for which I'll have to modify Struts-config.xml .



thnaks for your help in advance..
--
Abhi
thumbnail
Amit Doshi, módosítva 11 év-val korábban

RE: How to modify Polls portlet

Liferay Master Bejegyzések: 550 Csatlakozás dátuma: 2010.12.29. Legújabb bejegyzések
Abhi,

You can do with the help of HOOk, put entry in liferay-hook.xml as below.

The below is the example for my Hook


<struts-action>
        <struts-action-path>/journal/edit_article</struts-action-path>
        <struts-action-impl>com.sample.hook.CustomJournaStrutsAction</struts-action-impl>
    </struts-action>


Regards,
Amit Doshi
Sunil Mehtav, módosítva 11 év-val korábban

RE: How to modify Polls portlet

New Member Bejegyzés: 1 Csatlakozás dátuma: 2012.06.07. Legújabb bejegyzések
I have the same issue. I have done this as below
<struts-action>
<struts-action-path>/polls/edit_question</struts-action-path>
<struts-action-impl>com.liferay.portlet.polls.action.AHEditQuestionAction</struts-action-impl>
</struts-action>
The issue here is that it will call the process action of AHEditQuestionAction which implements StrutsPortletAction but i also want to use(override) another methods of EditQuestionAction(original strutsimpl class). If i do something like this AHEditQuestionAction extends EditQuestionActionimplements StrutsPortletAction, then i am facing class loading issue. Could you please update on this.

Thanks for your help