portlet

Spring portlet @ActionMapping usage

折月煮酒 提交于 2019-12-03 04:05:58
could please anybody explain, how POST request should be mapped properly ? it is not clear from API documentation. value should be assigned with the value of the action parameter javax.portlet.action @ActionMapping(value = "addDocOrder") public void addDocOrder(@ModelAttribute("order")....... AND next we have "params" (JAVADOC: The parameters of the mapped request, narrowing the primary mapping.) @ActionMapping(params = "action=addDocOrder") public void addDocOrder(@ModelAttribute("order")....... JAVADOC for value() parameter of annotation: The name of the action, according to the Portlet 2.0

Liferay Portlet Basic MVC Flow and View Selection

[亡魂溺海] 提交于 2019-12-02 10:17:35
问题 I'm trying to develop a basic portlet with LifeRay 6.1. I'm well versed with various MVC implementations, but I find Liferay / java portlets somewhat confusing - especially the execution pipeline. With most MVC frameworks I've worked with the premise is simple request > router > controller > view. The view selection is usually based the controller / action naming convention, a parameter passed in with the request or is manually loaded in the controller action. With LifeRay MVCPortlet it doesn

Liferay - Error while creating first portlet plugin project

自闭症网瘾萝莉.ら 提交于 2019-12-02 10:09:37
I followed the tutorial here to setup Liferay + server + SDK, but I got an error while creating my portlet. It tells me that the portlet gets created, but I still get an error and it doesn't show in my package explorer in Eclipse. I'm working on a Mac with Eclipse. Here the error: org.eclipse.core.runtime.CoreException: Source '/Users/danielstorch/Documents/Develop/workspace/.metadata/.plugins/com.liferay.ide.sdk.core/create/1431263175117' does not exist at com.liferay.ide.project.core.PluginsSDKProjectProvider.doCreateNewProject(PluginsSDKProjectProvider.java:182) at com.liferay.ide.project

Spring-portlet POST ajax xmlHttpRequest

半世苍凉 提交于 2019-12-02 07:31:19
Could please anybody who has experiences with processing post xmlHttpRequests with Spring DispatcherPortlet, tell me what is the best way to do it ? I'm using YUI io module and Jackson Object Mapper as an example : @ResourceMapping(value="stuff") public void method(ResourceResponse response){ Person person = new Person(); person.setWeight(150); ObjectMapper mapper = new ObjectMapper(); try{ mapper.writeValue(response.getWriter(), person); } ... } Ajax: function() { var A = AUI(); A.io("<portlet:resourceURL id="stuff" />", { method: 'POST', data: { description: 'value' } }); } This is the issue

Liferay portlet: redirect to an other jsp page from javascript

拥有回忆 提交于 2019-12-02 06:30:38
问题 I want to redirect to an other jsp page in a liferay portlet from js. The idea that I found is using a renderurl. The best code that I found that can help me as a first step is this one: <a id="renderURLWithJS" href=""> This render URL link is created with Javascript</a> <aui:script> AUI().use('liferay-portlet-url', function(A) { var param="Hello new jsp"; var renderUrl1 = Liferay.PortletURL.createRenderURL(); renderUrl1.setWindowState("<%=LiferayWindowState.NORMAL.toString() %>"); renderUrl1

Liferay portlet: redirect to an other jsp page from javascript

梦想与她 提交于 2019-12-01 23:48:40
I want to redirect to an other jsp page in a liferay portlet from js. The idea that I found is using a renderurl. The best code that I found that can help me as a first step is this one: <a id="renderURLWithJS" href=""> This render URL link is created with Javascript</a> <aui:script> AUI().use('liferay-portlet-url', function(A) { var param="Hello new jsp"; var renderUrl1 = Liferay.PortletURL.createRenderURL(); renderUrl1.setWindowState("<%=LiferayWindowState.NORMAL.toString() %>"); renderUrl1.setParameter("param",param); renderUrl1.setParameter('mvcPath', 'display.jsp'); /* is this correct???*

Liferay 6.1 portlet worked incorrect in 5.2.3

社会主义新天地 提交于 2019-12-01 20:53:07
I have a portlet that worked fine on Liferay 6.1 portal but when I deploy it on Liferay 5.2.3 my configuration page did not even open. How should I make it work ? Prakash K Here is a nice authoritative answer to a very similar question. The portlets of newer versions are not designed to work on older installation of Liferay. Since they are compiled using the latest plugins-sdk and the also the different jars which have changed since the last version. So if you want the newer version portlet to work with any older version then you have to compile the portlet with an older version of Liferay

How to call specific method of portlet.java class rather then overide serveResource method?

你。 提交于 2019-12-01 20:38:48
问题 I want some help in liferay with ajax. Right now I am calling the ajax method from my view.jsp page to submit some data. Here is sample code I am using in view.jsp : <%@ include file="/init.jsp"%> <portlet:actionURL name="AddTest" var="add1" /> <portlet:resourceURL id="AddTest" var="AddTest"></portlet:resourceURL> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript"> function addToDo(addToDo

How to make the ResourceResponse to forward the request to error page in liferay portlet

廉价感情. 提交于 2019-12-01 19:50:26
I am trying to forward my request to error page when error occurs during generating excel sheet. Here is sample code below. I am not sure why it is not getting forwarded to error page when the exception is thrown, it is displaying blank page but not going to my error page for sure.` @ResourceMapping("xyz") public void generateExcelExport(ResourceRequest request, ResourceResponse response) { try { //Do all the excel related logic response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setProperty("Content-Disposition", "attachment; filename=\"" +

Is it possible to create dynamically pluggable GWT widgets/portlets in separate war files?

社会主义新天地 提交于 2019-12-01 17:53:41
Is it possible to create widgets / portlets in GWT that can be dynamically loaded and added to a GWT web application, and where the GWT widgets can reside in a separate war files? To clarify my question: JSR168/JSR286 compliant portals make it possible to create portlets in separate projects (war files) and to dynamically load these into a portal page. Suppose you want to do something similar in a GWT application. So suppose we made a portal using only GWT for the GUI (no JSP or alike) and we want to dynamically add a "portlet" written in pure GWT. Would that be possible? I can imagine that it