« Back

Calling OOTB portlet struts actions

General Blogs June 7, 2014 By Sushil Patidar

Many a time it is required to call OOTB portlet struts action from custom portlets.This can be done using the simple approach as follows.

 

public class TestPortlet extends MVCPortlet{
 
 @Override
 public void processAction(ActionRequest actionRequest,
 ActionResponse actionResponse)
 throws IOException, PortletException {
 
    try {
       
        PortletActionInvoker.processAction(
         "com.liferay.portlet.documentlibrary.action.EditFolderAction",                               getPortletConfig(),
          actionRequest, actionResponse);
 
     }
     catch(Exception e) {
 
        e.printStackTrace();
     }
}
 
}
No comments yet. Be the first.