liferay

How to share jar within multiple portlets?

六月ゝ 毕业季﹏ 提交于 2019-12-07 01:54:02
问题 I'm using several jars in my portlets, for instance c3p0. Now I want to avoid to put the jars in every of my portlets lib folders. How can I share one jar file within multiple portlets? And how should I integrate them in the Eclipse IDE? Add an external jar or put them in one dedicated project and include them from there? 回答1: Another solution would be to put them under ../liferay-portal-<version>/tomcat-<version>/webapps/ROOT/WEB-INF/lib If you place them here you can add the JAR as a

Velocity (VM) template request parameters: Getting GET variables

此生再无相见时 提交于 2019-12-06 16:14:27
How do i access GET variables as passed in the URI in a VM template? This works only when loading the widget URL: $request.get("parameters").get("fav").get(0) I'm looking for a neat solution that works with friendly URLs. Here's my testing template: <br><br><br> #set($url = $request.attributes.CURRENT_URL) <h2>url: $url</h2> #set($favs = $url.split("fav=")) favs: $favs<br> favs.size(): $favs.size() <br> #if($favs.size() > 1) #set($fav1 = $favs.get(1).split("&").get(0)) fav1: $fav1<br> #else No fav! #end #if($favs.size() > 2) #set($fav2 = $favs.get(2).split("&").get(0)) fav2: $fav2<br> #end

Liferay date-input displays wrong date

与世无争的帅哥 提交于 2019-12-06 15:32:34
I'm using Liferay 7.1 I have the following liferau-ui:input-date object and I want to pre-select a date: <% final LocalDate today = LocalDate.now(ZoneId.systemDefault()); %> <liferay-ui:input-date dayValue="<%= today.getDayOfMonth()%>" monthValue="<%=today.getMonth().getValue()%>" yearValue="<%= today.getYear()%>" </liferay-ui:input-date> When I output today 's values directly on the JSP I get the correct date for today: 3 12 2018 . When the element is rendered, it has selected the wrong date: 01/03/2019 . There is nothing further documented in the taglibdocs that I think could help. How can I

Understanding the execution of Action Phase and Render Phase

青春壹個敷衍的年華 提交于 2019-12-06 14:58:26
问题 I am using Liferay 6 for the Portal Development . By going through Liferay Developer Guide the author explains that there are Two phases of Portlet Execution Action Phase Render Phase public class DateTimePortlet extends GenericPortlet { public void doView(RenderRequest req, RenderResponse res) throws IOException, PortletException { Object actionAttribute = req.getAttribute("datetime"); res.getWriter().println("Date Time:" + (actionAttribute != null ? actionAttribute :"Unavailable")); res

Users are not getting deleted from Liferay DB

江枫思渺然 提交于 2019-12-06 13:58:35
问题 I have deleted users from Liferay UI. Some time its asking to deactivate and then delete. some time only deactivate. And users are not going from db always. So, recreation of same user is not possible as it is throwing errors like "email address already exist or username alreasdy exist". Why user is not getting deleted from DB after deletion from UI? I am using liferay-portal-6.1.1-ce-ga2. How to solve this issue? 回答1: Deactivate and Delete are two different functionalities. When you

How to migrate Liferay portal from one windows machine to other?

a 夏天 提交于 2019-12-06 12:31:28
问题 Liferay migration from one server to another help required. Can anyone share there steps for migration of Liferay portal 5.2.3 from one server to another. I am using Windows + Tomcat + MySql. I have uploaded whole tomcat folder to the new windows machine and imported the database too with the corresponding change to the configuration file like Database details. But after starting the tomcat server it is showing some error like "Unable to load repository http://plugins.liferay.com". Any idea

Kaleo workflow in custom portlet

南楼画角 提交于 2019-12-06 12:23:13
问题 Steps to create kaleo workflow in custom portlet Liferay 6.1.1 GA2. Hi, I am new to liferay. I am using Liferay 6.1.1 GA2 version. Can somebody please provide me the steps to create workflow in custom portlets with some workable samples. Thanks in advance. 回答1: Add entity in service.xml regarding your workflow portlet. i.e <entity name="XXWorkflow" local-service="true" remote-service="false"> <!-- PK fields --> <column name="workflowId" type="long" primary="true" /> <!-- Foreign key columns -

get Liferay user information with Vaadin

只愿长相守 提交于 2019-12-06 12:13:15
问题 I need to check in my portlet wich language does an user have selected as his "main" language, to do that, I have to get the UserID (name) first . i have been looking for it for two days (Liferay forums , vaadin forums , stackoverflow etc.) but nothing found that would work so far. I have found an nice example but it doesnt seem to work (It always returns "null"). package com.example.translation_portlet; import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; import com

Liferay 7 not able to set the global session attribute

大城市里の小女人 提交于 2019-12-06 12:00:35
问题 I am trying to set the Session attribute [HTTP or Portlet Session] so that i can access it globally (through out the portal). But while getting the Session attribute its returning me the null instead of actual value. SETTING the Session Attribute: @Component( immediate = true, property = { "com.liferay.portlet.display-category=IPC Sender", "com.liferay.portlet.instanceable=true", "javax.portlet.display-name=IPC_Sender Portlet", "javax.portlet.init-param.template-path=/", "javax.portlet.init

Liferay development in Eclipse [closed]

限于喜欢 提交于 2019-12-06 11:12:17
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I've seen that most of the documentation in the Liferay Wiki (concerning Eclipse plugins and the like) refers to Liferay version 4.x. Are there up-to-date resources for developing Liferay portlets with eclipse (3.5)? There is a new top