liferay-6

Primefaces <p:ajax update=“@all” /> doesn't work

醉酒当歌 提交于 2019-12-04 18:11:14
I've got a problem with using p:ajax update atribute element. When I use in my code <p:ajax update="@all" /> then I am getting javax.el.PropertyNotFoundException . When I use <f:ajax render="@all" /> I don't get any. I though that thouse tags are nearly same. Can anyone explain whats happening? I am using mojjara implementation, primefaces 3.5 and Liferay jsf portlet bridge. Example of stacktrace: Caused by: javax.el.PropertyNotFoundException: /pages/views/personForm.xhtml @95,99 value="#{personManagementBean.item.contact.phoneNumber}": Target Unreachable, 'null' returned null at com.sun.faces

How to use Liferay's permission system in other applications?

▼魔方 西西 提交于 2019-12-04 14:49:35
I'm considering using Liferay's permission system to implement access security in an external Java application (not a portlet). Liferay has robust features for managing users, groups, roles, permissions and resources. It would be great if I could leverage those instead of re-inventing the wheel in our external app. Liferay and our external application are configured to use the same CAS and LDAP for authentication, so they share the same users. So far I've successfully used Liferay's JSON-WS API to manage a user's Roles. This is great but I need to take it to the next step. Can I define and

Liferay 6 - How to set up custom layout as default?

百般思念 提交于 2019-12-04 14:44:51
I'm working on a Liferay 6 project, and part of the project is to create a new layout template to be used for the entire site as the default. Liferay's own wiki is very sparse on documentation about layout templates, and I haven't had better luck with Google searches or even here on SO. I did find one article ( Liferay - Layout for each pages ) that sort of answers the question, but it seems like it might be overkill. In that question, the goal was to change the template based on the page, so the answer was to create a Hook and use that to set the template on the fly as needed. Here, I just

Liferay: what is the relationship and difference between ActionRequest, RenderRequest and PortletRequest?

别说谁变了你拦得住时间么 提交于 2019-12-04 14:41:02
问题 What is the relationship and difference between ActionRequest , RenderRequest and PortletRequest ? Can we get instance of one from another? 回答1: The PortletRequest is the parent of both. An ActionRequest and a RenderRequest are both different types of PortletRequest objects. An ActionRequest is valid during the action processing phase of the portlet. During this phase, the portlet hasn't completely decided how it is going to render itself, be it minimized, maximized, in edit mode or in veiw

How to retrieve a user profile picture in Liferay

我是研究僧i 提交于 2019-12-04 13:00:24
I want to retrieve a user profile picture. How do i do it? Could you please share a code snippet? Im using Liferay 6.0.6. It has only user.getPortraitId() and no user.getPortraitURL(). So once i get the portrait id inside a JAVA class, what do i do with it? See the implementation of UserConstants.getPortraitURL(...) https://github.com/liferay/liferay-portal/blob/master/portal-service/src/com/liferay/portal/model/UserConstants.java On this approach you can get the image url. If you need the image object, you can load it with ImageLocalServiceUtil : long portraitId = user.getPortraitId(); Image

How do I use the different file storage and retrieval APIs in Liferay?

可紊 提交于 2019-12-04 11:55:43
When developing a Liferay portlet, sometimes you want to use file artifacts. For example, you might want to have a configurable image(s), or the means to let users attach files to your custom service entity. There are several API's built into Liferay that address this problem. How is each one used? Prakash K Following are the three methods which I can think of to store and retrieve files. Method-1 Storage: Method using the DLStoreUtil as you have shown in your question . Retrieval: For this you need to get the file as a stream and then send it to the browser using the following code: String

Liferay Portlet: How to generate service.xml (service builder) from existing database

混江龙づ霸主 提交于 2019-12-04 09:24:45
I am new to liferay, Can anyone please suggest some way to generate the service.xml for existing database Discussion on Liferay Website . I hope people might have developed some way or liferay have developed some plugin for this. I see no particular use in introducing servicebuilder to large existing databases: You can connect servicebuilder entities to "legacy datasources" or "legacy tables" (those make good search terms) but service.xml generation has not been done AFAIK. Some problem with this approach are: servicebuilder has certain assumptions about operations in a database. It's done to

Liferay concatenate and compress javascript

*爱你&永不变心* 提交于 2019-12-04 09:08:01
I am trying to figure out how to achieve compression and minification for all my js files. Currently i have them in a hook plugin under /html/js/mycustomjs/ folder. I understand that liferay has its own mechanism to compress javascripts, in barebone.jsp or everything.jsp, and found the list of files declared in the javascript.barebone.files and javascript.everything.files properties on portal.properties . The question is, can i use this mechanism to compress js files of my own ? should i override such properties in the portal-ext.properties ? Or should i just use the MinifierFilter by myself ?

How can I get the values submitted from a JSP in Liferay?

两盒软妹~` 提交于 2019-12-04 05:19:34
问题 I am using Liferay Portal 6 version. How can I get the UserName and Password values with in the same page? <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <%@page import="javax.portlet.RenderRequest"%> <portlet:defineObjects /> This is the <b>Kiran</b> portlet. <form> <p><b>UserName:</b> <input type="text" name="UserName" size="10"></p> <p><b>Password:</b>   <input type="Password" name="Password" size="10"></p> <p><input type="submit" value="Submit" name="submit"><input

Severe security constraints while tomcat 8 startup with liferay

烂漫一生 提交于 2019-12-04 04:22:15
I am getting the below severe message while the tomcat 8 comes up with liferay. SEVERE [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.SecurityConstraint.findUncoveredHttpMethods For security constraints with URL pattern [/bg/c/portal/protected] only the HTTP methods [POST GET] are covered. All other methods are uncovered. 03-Sep-2015 07:06:00.733 SEVERE [localhost-startStop-1] org.apache.tomcat.util.descriptor.web.SecurityConstraint.findUncoveredHttpMethods For security constraints with URL pattern [/sv/c/portal/protected] only the HTTP methods [POST GET] are covered. All other