liferay

Liferay: get PortletId and Plid from init(PortletConfig) [i.e, no request object, just PortletConfig]

杀马特。学长 韩版系。学妹 提交于 2019-12-24 17:22:34
问题 I would like to get both values, and since init(Portletconfig) is executed when loading the portlet, I don't see any doubt about whether this values should be available. For portletId I tried String portletId = ((PortletConfigImpl) portletConfig).getPortletId(); but it seems I can't. Guess it is because the impl is in another jar not meant to be accessed from portlets By the way, my main goal is to get to pass both params to another non-request context so I can do final PortletPreferences

Liferay structure template get Image name

人盡茶涼 提交于 2019-12-24 14:19:31
问题 I have image field in structure for Web Content display: <root available-locales="en_US" default-locale="en_US"> <dynamic-element dataType="image" fieldNamespace="wcm" indexType="keyword" name="image_1" readOnly="false" repeatable="false" required="false" showLabel="true" type="wcm-image" width=""> <meta-data locale="en_US"> <entry name="label"> <![CDATA[Image 1]]> </entry> <entry name="predefinedValue"> <![CDATA[]]> </entry> <entry name="tip"> <![CDATA[]]> </entry> </meta-data> </dynamic

Country and State selection using html and Javascript

左心房为你撑大大i 提交于 2019-12-24 13:52:52
问题 I have applied the logic in view.jsp in Liferay to show the state list on State drop down based on the Country selected from the Country drop down. I have used html and java script to achieve this goal of showing the state drop down for the selected country from drop down list. Currently, when I first load the form, both of the Country and the state label with drop down is displaying. The state drop down is empty at first. Then when I select country, Example: USA, state drop down is changed

How to use custom mysql query from my liferay custom portlet?

房东的猫 提交于 2019-12-24 13:07:03
问题 I am using Liferay and developing my custom portlet, now I want to use custom query to retrieve some data from multiple table with joins etc. I have googled the things for my problem but can't find the simple way to understand the step-by-step procedure. So if any one can guide me or give me any tutorial to create Custom SQL query for my custom portlet. after this 4th step i have built my service in eclipse,and its showing successfully.there are two file created in service/persistence package

Customizing liferay hook custom fields

帅比萌擦擦* 提交于 2019-12-24 12:27:43
问题 I need to add a Custom Field to Site create page, i went to Portal > Custom Fields > Site and added a custom field named " licence ". I followed this tutorial http://www.liferay.com/pt/community/wiki/-/wiki/Main/Custom+Fields+and+JSP+Hooks I'm trying to access this field in details.jsp page. It's located at of tomcat-7.0.27\webapps\ROOT\html\portlet\sites_admin\site i tryed to do this: <liferay-ui:custom-attribute label="Licence" className="<%= Site.class.getName() %>" classPK="<%= 0 %>"

change portlet title from code in Liferay without Jquery

[亡魂溺海] 提交于 2019-12-24 12:00:22
问题 I'm having solution to change title of portlet through JQuery. $('#idOfPortlet').find('.portlet-title').html('new title'); But we dont want to use JQuery in our project. Is there any solution to change title of portlet using YUI or anyother thing through code? Thanks in Advance. Regards, Mayur Patel 回答1: If the version of Liferay you're on is using YUI 3, then this aught to do it: Y.one('#idOfPortlet .portlet-title').setContent('new title'); I'm not sure if Liferay exposes the YUI instance as

Why my first “Hello World” LifeRay portlet result to be “temporarily unavailable.”?

泄露秘密 提交于 2019-12-24 11:35:26
问题 I am absolutly new in LifeRay portlet development and I have some problem to create an "Hello World" test portlet into a project on which I am working on. In this project it is used Structs 2 to do the dispatchment. So I have done the following operations: 1) I create the TestPortlet1Action class into this folder: /Web/src/main/java/mypackage/actions/ where I define the startTestPortlet1() method that is the starting method of my protlet (I think that this is the portlet entry point): package

How do I display Liferay content from the built in Documents and Media repository

不羁岁月 提交于 2019-12-24 10:24:05
问题 I've integrated Liferay and Alfresco, using Alfresco as the primary CMS and Liferay as the presentation tier. In Liferay's control panel, I've added the Alfresco repository using the utility in Documents and Media and the folders and files stored in that repository all display just fine. The issue I am having is this - I do not see a clear process in Liferay's documentation on how to point a specific document stored in that repository to be displayed in a portlet. I should add that I am using

Exception when I try to run a liferay portlet on my tomcat server

佐手、 提交于 2019-12-24 09:49:01
问题 This is what I get: Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 8099; nested exception is: java.net.BindException: Address already in use: JVM_Bind. I have to mention that I use liferay 7.0 ga3 and tomcat 8.0.32 , my ide is eclipse luna . I tried to run in command line start rmiregistry some_port, but it didn't do nothing, just popped up a window and did effectively nothing. Thank you! 回答1: In general, Tomcat uses the port 8099 to JMX

“Current request is not a portlet request” error running Liferay portlets on WebLogic using Spring 3.0.5 and aop with a request scope bean

霸气de小男生 提交于 2019-12-24 09:28:34
问题 Has anyone seen and resolved this error? Caused by: java.lang.IllegalStateException: Current request is not a portlet request at org.springframework.web.portlet.context.PortletApplicationContextUtils.currentRequestAttributes(PortletApplicationContextUtils.java:194) at org.springframework.web.portlet.context.PortletApplicationContextUtils.access$0(PortletApplicationContextUtils.java:191) at org.springframework.web.portlet.context.PortletApplicationContextUtils$WebRequestObjectFactory.getObject