portlet

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 %>"

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

What's wrong with my listener in my web.xml?

假装没事ソ 提交于 2019-12-24 11:13:05
问题 We're using JBoss 4.22 with portlets. When the listener tag is not in the web.xml the portlet loads, but the listener sessionDestroyed() is never called (obviously). When added the portlet isn't loaded, and there aren't any exceptions or log messages. Are there any gotchas I should be aware of? <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4

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

How to navigate from portlet to portlet

自闭症网瘾萝莉.ら 提交于 2019-12-24 08:13:56
问题 My question is how can I go from one portlet to another. My scenario is this: The user can view a specific portlet's view.jsp. When he clicks on a button then the page will show the view.jsp of another portlet. Maybe this is called portlet redirection, but I have no idea how to implement this. Maybe one solution could be different jsp files in the same portlet but I want to navigate through portlets not the jsps. It would be useful if someone could provide me a sample of code or a reference

Bypassing grails view resolvers?

天大地大妈咪最大 提交于 2019-12-24 03:04:15
问题 I'm trying to build a portlet within a grails application, and I've created a simple controller extending AbstractController which returns new ModelAndView('myportlet') from handleRequestInternal . I also have a standard Jstl view resolver setup for /WEB-INF/jsp but no matter what I try, when I try to view the portlet within liferay I get the following stacktrace: 13:19:39,723 ERROR [DispatcherPortlet:559] Could not complete request java.lang.ClassCastException: org.springframework.web

portal:actionURL Spring MVC Portlet

你说的曾经没有我的故事 提交于 2019-12-24 02:33:37
问题 I am trying to create a actionUrl using the following code <portlet:actionURL var="actionUrl"><portlet:param name='action' value='viewModules' /></portlet:actionURL> and map that onto a spring controller However the controller does not respond as the generated url's ampersands are encoded e.g. <snip>&p_p_lifecycle=1&p_p_state=normal&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=2</snip> If I unencode and paste into the browser this works I have added portlet.url.escape.xml=false to portal

Relative File Path Problem

☆樱花仙子☆ 提交于 2019-12-24 02:25:31
问题 I am developing a portlet that is trying to read in a config file. I am developing it in an eclipse project. I currently have the config file placed inside my WEB-INF folder (which is in root/WEB-INF/), and its called config.properties. How can I access this file using relative path in my java source code? (which is in root/src/package/mysource.java) For example, File myfile = new File("WHAT DO I PUT HERE/config.properties"); Any help you can provide would be great! 回答1: Since this is a

Remove duplicate header entries from doHeaders()

[亡魂溺海] 提交于 2019-12-24 01:19:30
问题 I have several portlets which each use an aggregation of pooled CSS and JS files within a single web application. Currently each portlet will add appropriate head tags in doHeaders(). However, this causes duplicate tags within the head when more than one portlet is on the same page. Currently the portlets are deployed on eXo which runs on GateIn. eXo has it's own JS AMD framework and portlet skin system, but we add head elements using doHeaders() to be as platform-agnostic as possible for