portlet

Spring-portlet POST ajax xmlHttpRequest

笑着哭i 提交于 2019-12-20 06:08:15
问题 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("

Liferay 6.1 portlet worked incorrect in 5.2.3

淺唱寂寞╮ 提交于 2019-12-20 01:59:24
问题 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 ? 回答1: 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

Creating liferay portlet - how to pass data to view.jsp from Java class?

99封情书 提交于 2019-12-18 10:53:37
问题 I'm trying to create portlet in liferay with just only from a JSP file called view.jsp . What I need is: When the portlet loads, I want to call custom Java class where I generate an array. I need to pass that array to the view.jsp . How to do that? 回答1: Have you created your portlet with the create.sh script from Liferay? In this case, we will need to create a new portlet class that extends MVCPortlet : public class ArrayPortlet extends MVCPortlet { } Also, you will have to change the WEB-INF

How can I run some action when my plugin was deployed to Liferay?

爷,独闯天下 提交于 2019-12-18 09:14:54
问题 I want to run some code as soon as my plugin ( portlet , hook or theme ) is available in Liferay. I can't find anything like a startup listener in liferay-plugin-package.xml , liferay-portlet.xml , liferay-hook.xml or liferay-look-and-feel.xml . 回答1: There is another way. You could utilize the StartupAction. It is merely an Event, which get's triggered on every startup of a plugin. This method will only get triggered once on a server start or deploy. Recognize, that the doRun method get's a

Display portlet in pop-up Liferay

时间秒杀一切 提交于 2019-12-18 08:58:21
问题 I am trying show a portlet (that previously I have created) from another one, but the pop-up is empty. First, I create the renderURL: <liferay-portlet:renderURL var="testPopupURL" portletName="<%=rule.getBannerPortletId() %>" windowState="<%=LiferayWindowState.POP_UP.toString() %>"></liferay-portlet:renderURL> and I do the link: <aui:a href="#" onClick="showPopup('${testPopupURL}')">View</aui:a> and this is the function showPopup: function showPopup(url){ console.log("En el showPopup "); AUI(

How to deploy portlets to Liferay?

£可爱£侵袭症+ 提交于 2019-12-17 18:40:52
问题 I have faced problems in trying to install new portlets to Liferay running on Glassfish domain. I figured out the flow very lately and want to share it with others also. So, please read the answer and hope this helps someone :) (Pre requisites for the problem is that I knew that adding projects running on Glassfish is done with a autodeploy folder, but making them visible on Liferay was another story.) 回答1: So, you make first a .war file let's say a portlet of name your_file.war. You wanna

Navigation portlet: all childen always expanded

。_饼干妹妹 提交于 2019-12-14 03:53:50
问题 How can I make the navigation portlet show children even for unselected folders? I mean initial tree state is fully expanded (at least for one level, ie: direct children). I'm looking at INavtreeStrategy, SitemapNavtreeStrategy and INavigationQueryBuilder but no insights so far. 回答1: I got it looking at Products/CMFPlone/browser/sitemap.py I just had to use its query builder instead. Here's the code: from Acquisition import aq_inner from zope.component import getMultiAdapter from plone

ERROR [Jsr168Dispatcher:38] Could not find action There is no Action mapped for action name default. - [unknown location]

橙三吉。 提交于 2019-12-13 20:06:19
问题 I do have a problem when I run my portlet application, I have this error : ERROR [Jsr168Dispatcher:38] Could not find action There is no Action mapped for action name default. - [unknown location] I'm working with Struts 2.2.1 and Liferay 6.0.6 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <constant name="struts.devMode" value="false" /> <package name=

Submit form in a displaytag pagination

喜夏-厌秋 提交于 2019-12-13 16:24:49
问题 I'm using spring portlet mvc and JQuery. The thing is that I need to submit my form when I click the pagination links from the displayTag (when I try to go to the second page for instance) <form:form id="myForm" action="${formAction}" method="post" modelAttribute="myBean" enctype="multipart/form-data"> <portlet:actionURL var="viewListURL" portletMode="view"> <portlet:param name="action" value="${ServletContextKeys.MY_ACTION}"/> </portlet:actionURL> <display:table id="displayImpGasto" name="$

Liferay: get PortletID and companyID from init()

北城以北 提交于 2019-12-13 16:22:05
问题 Maybe trough PortletConfig in init(PortletConfig) The thing is that using ((PortletConfigImpl) portletConfig).getPortletId(); is not allowed anymore because adding portal-impl.jar in package.properties gives throws an exception when trying to execute build ant target, saying that this is not allowed anymore For companyID I directly have no idea where to start. I am using currently long companyId = CompanyLocalServiceUtil.getCompanies().get(0).getCompanyId(); but as soon as I got more than one