Foros de discusión

Struts Action Hook for Search Portlet

Liferay Developer, modificado hace 9 años.

Struts Action Hook for Search Portlet

New Member Mensajes: 3 Fecha de incorporación: 18/06/14 Mensajes recientes
Hi,

I have followed this thread
and made a sample hook.
It is working fine with Login portlet, ExampleStrutsPortletAction gets called.
But when I used same hook for Search Portlet its not working.
The only change I have made is in liferay-hook.xml
<hook>
<portal-properties>portal.properties</portal-properties>
    <custom-jsp-dir>/META-INF/custom_jsps</custom-jsp-dir>
	<struts-action>
    <struts-action-path>/portal/sample</struts-action-path>
    <struts-action-impl>
    com.liferay.sample.hook.action.ExampleStrutsAction
    </struts-action-impl>
</struts-action>
<struts-action>
    <struts-action-path>/search/search</struts-action-path>
    <struts-action-impl>
    com.liferay.sample.hook.action.ExampleStrutsPortletAction
    </struts-action-impl>
</struts-action>
</hook>


when I give
<struts-action>
    <struts-action-path>/login/login</struts-action-path>
    <struts-action-impl>
    com.liferay.sample.hook.action.ExampleStrutsPortletAction
    </struts-action-impl>
</struts-action>


ExampleStrutsPortletAction is called.
Can Anyone tell me what I have to change.
I am using Liferay 6.2 CE version.
Also Alfresco 4.2 community version is integrated.

Thanks in Advance.
thumbnail
Rajesh Chaurasia, modificado hace 9 años.

RE: Struts Action Hook for Search Portlet

Regular Member Mensajes: 183 Fecha de incorporación: 18/08/11 Mensajes recientes
I am also looking for this customisation but wanted to share my understanding that I have , pl correct if i am wrong.The search portlet does not have action class and so no processAction or render methods.if you look into struts-config.xml you will find that for struts path /search/search there is only a forward and no action class.So i think for this requirement we have to something different.