Jonas X. Yuan Vor 13 Jahren cooooooooooooooooooool feature! Thanks a lot, Mika and Brian. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ray Augé Vor 13 Jahren Awesome Mika! I'm glad you guys worked on this. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Pravin Pawar Ray Augé Vor 13 Jahren Really Nice Features....Good Work Mika & Team Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Pravin Pawar Ray Augé Vor 13 Jahren Really Nice Features....Good Work Mika & Team Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
James Min Vor 13 Jahren Excellent! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Sampsa Sohlman Vor 13 Jahren Hienoa Mika, this is useful feature. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jay Patel Vor 13 Jahren Nice Feature! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Amos Fong Vor 13 Jahren Sweet! Nice work Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Armin Cyrus Dahncke Vor 13 Jahren outstanding,give more power to the hooks. thx mika Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ruth Coca Vor 13 Jahren Awesome!! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Peter Mesotten Vor 13 Jahren Great feature!! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ahmed Hasan Vor 13 Jahren This is a fantastic feature, most awaited to get realized thru a hook plugin. Nice Job Mika and Brian. Thank you so much. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Vor 13 Jahren We just made it even more powerful by passing in reference to the original action so that you can just wrap it if you so wish. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Rushikesh S Thakkar Vor 13 Jahren Cool feature! Can't wait to get my hands on it.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Yogesh Agrawal Vor 13 Jahren Great Feature.Very useful one.. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
James Korotney Vor 13 Jahren Awesome - exactly what I went looking for.... when can I have it :-) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Sandeep Nair James Korotney Vor 13 Jahren Awesome feature. Is it possible to create custom services in hook and then call the new services from these overrided struts action? And any hint on when liferay 6.0 EE SP2 will be released so that i can use these in my project? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Sandeep Nair Vor 13 Jahren Yes you can use custom services in the hook plugin from the action classes. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Sandeep Nair James Korotney Vor 13 Jahren Awesome feature. Is it possible to create custom services in hook and then call the new services from these overrided struts action? And any hint on when liferay 6.0 EE SP2 will be released so that i can use these in my project? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Sandeep Nair Vor 13 Jahren Yes you can use custom services in the hook plugin from the action classes. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Sandeep Nair Vor 13 Jahren Yes you can use custom services in the hook plugin from the action classes. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Aig Loss Vor 12 Jahren - Bearbeitet About one year ago, I worked in a little development that allowed me to override/add, struts actions, tiles configurations, spring beans, and add classs to Liferay usng hooks...You con find some clues in a 3-posts series at http://aigloss.blogspot.com/2011/04/liferay-portal-server-avoiding-use-of.html.I've been using it in productin environments since there and has been tested in LF5.1.2 (it was originally developed for that LF version), ang earlier versions of Liferay 6 CE. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mike Oliver Vor 12 Jahren With Liferay 6.06 I am not finding com.liferay.portal.kernel.struts.BaseStrutsAction to import. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Roberto Barchino Mike Oliver Vor 12 Jahren Nice!Do you know if is possible to override an struts action in a hook without using ext--enviroment in liferay 5.2.3? Because in the DTD hook of liferay 5.2.3 there are the <struts-action> tags... but know I see that this will be a new functionality of liferay 6.1.I'm little bit confusing.Can anyone help me? Thank you. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Roberto Barchino Vor 12 Jahren Mike and Roberto this is only available in upcoming 6.1 and 6.0 EE SP2 and 5.2 EE SP6. Neither 6.0 CE or 5.2 CE has this feature as it was developed after their release. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Mika Koivisto Vor 12 Jahren Hi Roberto, I've posted the jar, and a sample hook for Liferay 5.2.3 with the module I was talking in the other post. As told, using that you'll be able to override/add struts configs and actions, tiles configs, spring beans, plus any other thing Liferay allow you to do using hook.You can check that sample out at http://aigloss.blogspot.com/2011/07/liferay-portal-server-avoiding-use-of.htmlHope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alex wom Aig Loss Vor 12 Jahren Hi Aig, is there something like zeep-o-tron for Liferay 6.0.6? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss alex wom Vor 12 Jahren I have'nt tested it yet for that Liferay version, but, unless there is some package modification or something like that, it will surely work.I'll try to test it and upload a working sample for LF 6.0.6 during this week. Just uploaded it for 5.2.3 first because of Roberto needs. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Aig Loss Vor 12 Jahren Hi Alex, finally I've found some time to test it on LF 6.0.6 and make some modifications. You can find the details here: http://aigloss.blogspot.com/2011/07/zeep-otron-for-liferay-6.html.Hope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Roberto Barchino Mike Oliver Vor 12 Jahren Nice!Do you know if is possible to override an struts action in a hook without using ext--enviroment in liferay 5.2.3? Because in the DTD hook of liferay 5.2.3 there are the <struts-action> tags... but know I see that this will be a new functionality of liferay 6.1.I'm little bit confusing.Can anyone help me? Thank you. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Roberto Barchino Vor 12 Jahren Mike and Roberto this is only available in upcoming 6.1 and 6.0 EE SP2 and 5.2 EE SP6. Neither 6.0 CE or 5.2 CE has this feature as it was developed after their release. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Mika Koivisto Vor 12 Jahren Hi Roberto, I've posted the jar, and a sample hook for Liferay 5.2.3 with the module I was talking in the other post. As told, using that you'll be able to override/add struts configs and actions, tiles configs, spring beans, plus any other thing Liferay allow you to do using hook.You can check that sample out at http://aigloss.blogspot.com/2011/07/liferay-portal-server-avoiding-use-of.htmlHope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alex wom Aig Loss Vor 12 Jahren Hi Aig, is there something like zeep-o-tron for Liferay 6.0.6? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss alex wom Vor 12 Jahren I have'nt tested it yet for that Liferay version, but, unless there is some package modification or something like that, it will surely work.I'll try to test it and upload a working sample for LF 6.0.6 during this week. Just uploaded it for 5.2.3 first because of Roberto needs. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Aig Loss Vor 12 Jahren Hi Alex, finally I've found some time to test it on LF 6.0.6 and make some modifications. You can find the details here: http://aigloss.blogspot.com/2011/07/zeep-otron-for-liferay-6.html.Hope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Roberto Barchino Vor 12 Jahren Mike and Roberto this is only available in upcoming 6.1 and 6.0 EE SP2 and 5.2 EE SP6. Neither 6.0 CE or 5.2 CE has this feature as it was developed after their release. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Mika Koivisto Vor 12 Jahren Hi Roberto, I've posted the jar, and a sample hook for Liferay 5.2.3 with the module I was talking in the other post. As told, using that you'll be able to override/add struts configs and actions, tiles configs, spring beans, plus any other thing Liferay allow you to do using hook.You can check that sample out at http://aigloss.blogspot.com/2011/07/liferay-portal-server-avoiding-use-of.htmlHope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alex wom Aig Loss Vor 12 Jahren Hi Aig, is there something like zeep-o-tron for Liferay 6.0.6? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss alex wom Vor 12 Jahren I have'nt tested it yet for that Liferay version, but, unless there is some package modification or something like that, it will surely work.I'll try to test it and upload a working sample for LF 6.0.6 during this week. Just uploaded it for 5.2.3 first because of Roberto needs. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Aig Loss Vor 12 Jahren Hi Alex, finally I've found some time to test it on LF 6.0.6 and make some modifications. You can find the details here: http://aigloss.blogspot.com/2011/07/zeep-otron-for-liferay-6.html.Hope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Aig Loss Mika Koivisto Vor 12 Jahren Hi Roberto, I've posted the jar, and a sample hook for Liferay 5.2.3 with the module I was talking in the other post. As told, using that you'll be able to override/add struts configs and actions, tiles configs, spring beans, plus any other thing Liferay allow you to do using hook.You can check that sample out at http://aigloss.blogspot.com/2011/07/liferay-portal-server-avoiding-use-of.htmlHope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen alex wom Aig Loss Vor 12 Jahren Hi Aig, is there something like zeep-o-tron for Liferay 6.0.6? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss alex wom Vor 12 Jahren I have'nt tested it yet for that Liferay version, but, unless there is some package modification or something like that, it will surely work.I'll try to test it and upload a working sample for LF 6.0.6 during this week. Just uploaded it for 5.2.3 first because of Roberto needs. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Aig Loss Vor 12 Jahren Hi Alex, finally I've found some time to test it on LF 6.0.6 and make some modifications. You can find the details here: http://aigloss.blogspot.com/2011/07/zeep-otron-for-liferay-6.html.Hope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
alex wom Aig Loss Vor 12 Jahren Hi Aig, is there something like zeep-o-tron for Liferay 6.0.6? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss alex wom Vor 12 Jahren I have'nt tested it yet for that Liferay version, but, unless there is some package modification or something like that, it will surely work.I'll try to test it and upload a working sample for LF 6.0.6 during this week. Just uploaded it for 5.2.3 first because of Roberto needs. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Aig Loss Vor 12 Jahren Hi Alex, finally I've found some time to test it on LF 6.0.6 and make some modifications. You can find the details here: http://aigloss.blogspot.com/2011/07/zeep-otron-for-liferay-6.html.Hope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Aig Loss alex wom Vor 12 Jahren I have'nt tested it yet for that Liferay version, but, unless there is some package modification or something like that, it will surely work.I'll try to test it and upload a working sample for LF 6.0.6 during this week. Just uploaded it for 5.2.3 first because of Roberto needs. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Aig Loss Aig Loss Vor 12 Jahren Hi Alex, finally I've found some time to test it on LF 6.0.6 and make some modifications. You can find the details here: http://aigloss.blogspot.com/2011/07/zeep-otron-for-liferay-6.html.Hope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Aig Loss Aig Loss Vor 12 Jahren Hi Alex, finally I've found some time to test it on LF 6.0.6 and make some modifications. You can find the details here: http://aigloss.blogspot.com/2011/07/zeep-otron-for-liferay-6.html.Hope you like it! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
(Sie) Vor 12 Jahren [...] If you are overriding just the jsp, you could do that via hook. If you are overriding struts action ,you may have to use the ext-plugin until overriding them is available via plugins.... [...] Read More Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jan Bub Vor 12 Jahren Realy cool. Canching the Portal will be so much easier. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Rajesh Chaurasia Vor 12 Jahren I am trying to create a hook plugin by extending the class EditPagesAction .I have provided my version of action class with name NPPEditPagesAction.I am able to deploy my plugin into liferay .But I am not able to excute my implemention class code given in NPPEditPagesAction.I tried to set breakpoint in my code but I am not able to get the Debug perspecetive in eclipse.hook.xml:--------------<hook> <custom-jsp-dir>/WEB-INF</custom-jsp-dir> <struts-action> <struts-action-path>/layout_management/edit_pages</struts-action-path> <struts-action-impl>com.liferay.portlet.communities.action.NPPEditPagesAction</struts-action-impl> </struts-action></hook>Implementiaon :public class NPPEditPagesAction extends EditPagesAction { public void processAction(ActionMapping mapping, ActionForm form, PortletConfig portletConfig, ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { System.out.println("Inside processAction...createTheme()"); String cmd = ParamUtil.getString(actionRequest, Constants.CMD); try { if (cmd.equals("createtheme")) { createTheme(actionRequest); } super.processAction(mapping, form, portletConfig, actionRequest,actionResponse); } catch (Exception e) { } } public ActionForward render(ActionMapping mapping, ActionForm form, PortletConfig portletConfig, RenderRequest renderRequest, RenderResponse renderResponse) throws Exception { return super.render(mapping, form, portletConfig, renderRequest, renderResponse); //return mapping.findForward(getForward(renderRequest, "portlet.communities.edit_pages")); } @SuppressWarnings("static-access") public static void createTheme(ActionRequest actionRequest) { System.out.println("Inside createTheme..."); ThemeUtil themeUtil = new ThemeUtil(); final String themeZipFilePath = ThemeUtil.SAMPLE_THEMES_PATH; final String themeConfigFilePath = ThemeUtil.THEMES_CONFIG_PATH; try{ //To Modify liferay-look-and-feel.xml themeUtil.getXMLDetails(themeConfigFilePath); //To Extract the sample themes zip folder to tomcat location themeUtil.extractFolder(themeZipFilePath); } catch (Exception ex) { ex.printStackTrace(); } }///edit_pages_look_and_feel.jsp<liferay-ui:section> <div style="width: 40%;">theme name:</div> <input type="text" id="name"> <div style="width: 40%;">theme id:</div> <input type="text" id="id"><br> <div style="width: 40%;">body background:</div> <input type="text" id="background" class="color"><br> <div style="width: 40%;">bgcolor:</div> <input type="text" id="bgcolor" class="color"><br> <input type="button" value="<liferay-ui:message key="save" />" onclick="<portlet:namespace />createTheme();" /> </liferay-ui:section>edit_pages.jsp---------------function <portlet:namespace />createTheme() { alert("Hi:Inside createtheme...."); document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = "createtheme"; submitForm(document.<portlet:namespace />fm); } Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Kamesh Sampath Vor 12 Jahren Was a very nice feature and i tried and implemented it successfully. I have small requirement not sure that is doable or not, i need to redirect to an existing Struts Action in one of the conditions during the render of the BaseStrutsPortletAction case. e..g redirecting to path "login/login" Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Vor 12 Jahren - Bearbeitet Rajesh Chaurasia, are you sure you have the right struts-path? Some of the paths are changed automatically by com.liferay.portal.struts.StrutsActionPortletURL so that the path matches the struts-path of the portlet. This can be quite confusing because the struts path in the jsp is different that what is actually rendered. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Mika Koivisto Vor 12 Jahren Kamesh Sampath, can you provide me a example of how would you do that with plain Struts? It might be possible if it's not then it might be something to consider adding. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Augé Mika Koivisto Vor 12 Jahren Isn't this supported by simply delegating those cases back to:"originalAction" which is the value of the execute's method ActionMapping parameter? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Ray Augé Vor 12 Jahren Ray that would only work if you are overriding that particular action. If you want to redirect from one action to another it would work. Well you could use response.sendRedirect(). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Mika Koivisto Vor 12 Jahren Kamesh Sampath, can you provide me a example of how would you do that with plain Struts? It might be possible if it's not then it might be something to consider adding. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Ray Augé Mika Koivisto Vor 12 Jahren Isn't this supported by simply delegating those cases back to:"originalAction" which is the value of the execute's method ActionMapping parameter? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Ray Augé Vor 12 Jahren Ray that would only work if you are overriding that particular action. If you want to redirect from one action to another it would work. Well you could use response.sendRedirect(). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Ray Augé Mika Koivisto Vor 12 Jahren Isn't this supported by simply delegating those cases back to:"originalAction" which is the value of the execute's method ActionMapping parameter? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Ray Augé Vor 12 Jahren Ray that would only work if you are overriding that particular action. If you want to redirect from one action to another it would work. Well you could use response.sendRedirect(). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Ray Augé Vor 12 Jahren Ray that would only work if you are overriding that particular action. If you want to redirect from one action to another it would work. Well you could use response.sendRedirect(). Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Paolo Pilitti Vor 12 Jahren - Bearbeitet I ve a similar problem of Rajesh Chaurasia i want override ...action.GetCategoriesActionso i write the liferay-hook.xml<struts-action> <struts-action-path>/asset/get_categories</struts-action-path> <struts-action-impl>it.reply.open.wt.asset.action.GetCategoriesAction</struts-action-impl> </struts-action>but when in my code it invokes this action it uses : url: themeDisplay.getPathMain() + '/asset/get_categories'adding the pathMain ( that in my case is /c/ ) so it cant find the action class...but if i dont add the pathMain it cant find url.there is a solution for this? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Kris Sokolovski Vor 12 Jahren Great, informative article! Really useful feature!But I was stuck in one silly mistake in my liferay-hook.xml. The ORDER of elements really MATTERS!It should be as described in "liferay-hook_6_0_0.dtd" (don't pay attention to version).My liferay-hook.xml was:<hook> <custom-jsp-dir>/WEB-INF/custom_jsps</custom-jsp-dir> <portal-properties>portal.properties</portal-properties></hook>This needed to be:<hook> <portal-properties>portal.properties</portal-properties> <custom-jsp-dir>/WEB-INF/custom_jsps</custom-jsp-dir></hook>I had problems to deploy it, and have gotten such ERROR:ERROR [HotDeployUtil:114] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for Search1-hookcom.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for Search1-hook at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46) at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:271) at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:111) at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:188) at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:40) at com.liferay.portal.kernel.servlet.HookContextListener.contextInitialized(HookContextListener.java:36) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4205) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4704) at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1282) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1380) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:306) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1385) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1649) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1658) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1638) at java.lang.Thread.run(Thread.java:619)I am glad it's resolved now, hope this will help others! Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jana Volkmer Vor 12 Jahren Great feature so far! ... but...I am trying to create a jsp-Hook for the portlet-configuration tabs. I already figured out, my struts action has to extend BaseStrutsPortletAction. But if I add my own Action there, I get the error 2011-12-12 16:04:00 ERROR [PortletRequestProcessor:377] Forward does not existAny help or hint would be great!(see also: this forum post ) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Rex Petersen Jana Volkmer Vor 12 Jahren I'm able to wrap the message_boards/view action as you describe here. But when I attempt to wrap /login/facebook_connect_oauth I get a runtime exception: com.liferay.portal.struts.PortletActionAdapter cannot be cast to com.liferay.portal.struts.ActionAdapter.If I instead extend the class BaseStrutsAction as below, the facebook login functionality ceases to work properly. Is there something fundamentally different about the FacebookConnectAction class or am I doing something wrong?public class FacebookMyConnectAction extends BaseStrutsAction { @Override public String execute(StrutsAction originalStrutsAction, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub return super.execute(originalStrutsAction, request, response); } Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Rex Petersen Jana Volkmer Vor 12 Jahren I'm able to wrap the message_boards/view action as you describe here. But when I attempt to wrap /login/facebook_connect_oauth I get a runtime exception: com.liferay.portal.struts.PortletActionAdapter cannot be cast to com.liferay.portal.struts.ActionAdapter.If I instead extend the class BaseStrutsAction as below, the facebook login functionality ceases to work properly. Is there something fundamentally different about the FacebookConnectAction class or am I doing something wrong?public class FacebookMyConnectAction extends BaseStrutsAction { @Override public String execute(StrutsAction originalStrutsAction, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub return super.execute(originalStrutsAction, request, response); } Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jon Haikarainen Vor 12 Jahren This is a nice feature indeeed, but there seems to be a bug when wrapping actions that are sending redirects. In my case I'm trying to wrap com.liferay.portal.action.LoginAction (/c/portal/login) with a custom action.In liferay-hook.xml I have the following:<hook> <portal-properties>portal.properties</portal-properties> <struts-action> <struts-action-path>/portal/login</struts-action-path> <struts-action-impl>PortalLoginAction</struts-action-impl> </struts-action></hook>Then, my PortalLoginAction -class has the following appearance:public class PortalLoginAction extends BaseStrutsAction { @Override public String execute(StrutsAction originalStrutsAction, HttpServletRequest request, HttpServletResponse response) throws Exception { //custom code return originalStrutsAction.execute(request, response); }}Everything works well here until reaching the execution of the original action. The problem seems to be that LoginAction.execute() uses response.sendRedirect() and returns null. The execute() method in com.liferay.portal.struts.StrutsActionAdapter in turn expects the original action to return an ActionForward, thus resulting in a NullPointerException (line 48).Does anyone know a workaround for this problem? I'm using Liferay 6 EE SP2 and I wouldn't like to make any custom fixes to the code. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Trevor Ackerman Jon Haikarainen Vor 12 Jahren I have also hit the same exact problem as Rex Petersen has above. In my case I am trying to override the action for the UpdateReminderQueryAction. The blog post does not make it obvious why the wrapper example above is extending BaseStrutsPortletAction. It is doing so because the action class for message boards view extends PortletAction.Rex, in the body of your execute method listed above replace the call to super.execute() with this instead:return originalStrutsAction.execute(request, response);Mika, if you could enhance your blog to mention this part of the process it would be greatly appreciated. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Trevor Ackerman Vor 12 Jahren Hey can you open a ticket for this and post the ticket number here. It should work with returning null as the forward. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Trevor Ackerman Mika Koivisto Vor 12 Jahren I'm assuming you are responding to Jon Haikarainen. right? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jon Haikarainen Trevor Ackerman Vor 12 Jahren Finally I got the ticket for the NullPointerException -case created: LPS-24734.Personally I don't however have a problem with this anymore as it turned out that customizing the action wasn't necessary in this case. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Trevor Ackerman Jon Haikarainen Vor 12 Jahren I have also hit the same exact problem as Rex Petersen has above. In my case I am trying to override the action for the UpdateReminderQueryAction. The blog post does not make it obvious why the wrapper example above is extending BaseStrutsPortletAction. It is doing so because the action class for message boards view extends PortletAction.Rex, in the body of your execute method listed above replace the call to super.execute() with this instead:return originalStrutsAction.execute(request, response);Mika, if you could enhance your blog to mention this part of the process it would be greatly appreciated. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Trevor Ackerman Vor 12 Jahren Hey can you open a ticket for this and post the ticket number here. It should work with returning null as the forward. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Trevor Ackerman Mika Koivisto Vor 12 Jahren I'm assuming you are responding to Jon Haikarainen. right? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jon Haikarainen Trevor Ackerman Vor 12 Jahren Finally I got the ticket for the NullPointerException -case created: LPS-24734.Personally I don't however have a problem with this anymore as it turned out that customizing the action wasn't necessary in this case. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Trevor Ackerman Vor 12 Jahren Hey can you open a ticket for this and post the ticket number here. It should work with returning null as the forward. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Trevor Ackerman Mika Koivisto Vor 12 Jahren I'm assuming you are responding to Jon Haikarainen. right? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jon Haikarainen Trevor Ackerman Vor 12 Jahren Finally I got the ticket for the NullPointerException -case created: LPS-24734.Personally I don't however have a problem with this anymore as it turned out that customizing the action wasn't necessary in this case. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Trevor Ackerman Mika Koivisto Vor 12 Jahren I'm assuming you are responding to Jon Haikarainen. right? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Jon Haikarainen Trevor Ackerman Vor 12 Jahren Finally I got the ticket for the NullPointerException -case created: LPS-24734.Personally I don't however have a problem with this anymore as it turned out that customizing the action wasn't necessary in this case. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Jon Haikarainen Trevor Ackerman Vor 12 Jahren Finally I got the ticket for the NullPointerException -case created: LPS-24734.Personally I don't however have a problem with this anymore as it turned out that customizing the action wasn't necessary in this case. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
R V Vor 12 Jahren Is this supported in 6.0.6 CE Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto R V Vor 12 Jahren R V this is implemented in 6.1.0 CE and backported to 6.0 EE SP2 so not available in 6.0.6 CE. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Kamesh Sampath Mika Koivisto Vor 12 Jahren When I override an existing JSP e.g. lets say blogs/search.jsp, I faced couple of problems1. I am not able to use the existing struts path "/blogs/search" eventhough I override the same in my hook.xml, its picking my class only when I give a alternate search path like "/blogs/search1"2. When i return the existing JSP page via the Struts Portlet Action render method I see the basic Portlet CSS styles are gone. Any thoughts on what I am missing and ways to fix them ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto R V Vor 12 Jahren R V this is implemented in 6.1.0 CE and backported to 6.0 EE SP2 so not available in 6.0.6 CE. Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Kamesh Sampath Mika Koivisto Vor 12 Jahren When I override an existing JSP e.g. lets say blogs/search.jsp, I faced couple of problems1. I am not able to use the existing struts path "/blogs/search" eventhough I override the same in my hook.xml, its picking my class only when I give a alternate search path like "/blogs/search1"2. When i return the existing JSP page via the Struts Portlet Action render method I see the basic Portlet CSS styles are gone. Any thoughts on what I am missing and ways to fix them ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Kamesh Sampath Mika Koivisto Vor 12 Jahren When I override an existing JSP e.g. lets say blogs/search.jsp, I faced couple of problems1. I am not able to use the existing struts path "/blogs/search" eventhough I override the same in my hook.xml, its picking my class only when I give a alternate search path like "/blogs/search1"2. When i return the existing JSP page via the Struts Portlet Action render method I see the basic Portlet CSS styles are gone. Any thoughts on what I am missing and ways to fix them ? Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mark Stein Vor 12 Jahren - Bearbeitet Is it posible to extend Action that are defined in liferay/.../liferay-portlet.xml, for examle: <portlet> <portlet-name>56</portlet-name> <icon>/html/icons/journal_content.png</icon> <struts-path>journal_content</struts-path> <configuration-action-class>com.liferay.portlet.journalcontent.action.ConfigurationActionImpl</configuration-action-class> ... Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Mika Koivisto Mark Stein Vor 12 Jahren Mark, unfortunately no. You can only extend actions that are defined in struts-config.xml Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Scott Lee Mika Koivisto Vor 12 Jahren cool feature : ) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Muradali Hasan Scott Lee Vor 12 Jahren Hi allthis is cool feature and i am trying to implement this but i have one questionthe default liferay action classes extends PortletAction class which is in portal-impl has method like getForward(),setForward(),sendRedirect(),now when i am override class i am replacing extends PortletAction with BaseStrutsPortletAction in that i am unable to get those methods for that what i need to change any one can give update Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Mika Koivisto Mark Stein Vor 12 Jahren Mark, unfortunately no. You can only extend actions that are defined in struts-config.xml Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Scott Lee Mika Koivisto Vor 12 Jahren cool feature : ) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Muradali Hasan Scott Lee Vor 12 Jahren Hi allthis is cool feature and i am trying to implement this but i have one questionthe default liferay action classes extends PortletAction class which is in portal-impl has method like getForward(),setForward(),sendRedirect(),now when i am override class i am replacing extends PortletAction with BaseStrutsPortletAction in that i am unable to get those methods for that what i need to change any one can give update Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Scott Lee Mika Koivisto Vor 12 Jahren cool feature : ) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen Muradali Hasan Scott Lee Vor 12 Jahren Hi allthis is cool feature and i am trying to implement this but i have one questionthe default liferay action classes extends PortletAction class which is in portal-impl has method like getForward(),setForward(),sendRedirect(),now when i am override class i am replacing extends PortletAction with BaseStrutsPortletAction in that i am unable to get those methods for that what i need to change any one can give update Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Muradali Hasan Scott Lee Vor 12 Jahren Hi allthis is cool feature and i am trying to implement this but i have one questionthe default liferay action classes extends PortletAction class which is in portal-impl has method like getForward(),setForward(),sendRedirect(),now when i am override class i am replacing extends PortletAction with BaseStrutsPortletAction in that i am unable to get those methods for that what i need to change any one can give update Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen
Zhidao Xu Vor 12 Jahren Hi,I got class cast exception when I access URL : [localhost:8080/c/message_boards/view]02:50:33,129 ERROR [StripFilter:59] java.lang.ClassCastException: com.liferay.portal.struts.PortletActionAdapter cannot be cast to com.liferay.portastruts.ActionAdapterjava.lang.ClassCastException: com.liferay.portal.struts.PortletActionAdapter cannot be cast to com.liferay.portal.struts.ActionAdapter at com.liferay.portal.struts.PortalRequestProcessor.processActionCreate(PortalRequestProcessor.java:485) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230) at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533) at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Melden Sie sich an, um auf diesen Beitrag zu antworten. Antworten als... Abbrechen