liferay-6

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

how to create divs dynamically in Jquery?

痴心易碎 提交于 2019-12-24 06:40:14
问题 My requirement is that I need to replace $ with JQuery and I have to create the <div/> s dynamically. I need to display the data using Jquery . Please explain me control flow for this example: <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> <%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %> <portlet:defineObjects /> This is the <b>AjaxApp</b> portlet in View mode. <script type="text/javascript" src="/html/js/jquery/jquery.js"></script> <aui:form> <aui:input name=

How to call stored procedure in liferay?

佐手、 提交于 2019-12-24 05:46:22
问题 I am referring Using dynamic query in Liferay and using MySQL 5.5 but instead of custom queries involving multiple entities,we need to call a stored procedure. We have created a sample procedure delimiter // Create Procedure proc_check (OUT count INT) begin select count(*) into count from lg_office ; end// In default.xml,containing custom queries,we have used <sql id="de.uhh.l2g.plugins.service.persistence.ProducerFinder.findOfficeCount"> <![CDATA[ Call proc_check(@output) ]]> </sql> In the

How to get RoleId using Role Name in liferay?

安稳与你 提交于 2019-12-24 04:09:06
问题 Is there any method where I can get the RoleId using Role Name? I have created some custom roles on my portal, like "Project Manager", "Client" and "Delivery Head". Now I need to get the respective role of these custom roles programmatically using Role Name. Any suggestions? 回答1: You can use RoleLocalServiceUtil.getRole(companyId, name) method to get the role object (instance of RoleModel ). If you need the id, call role.getRoleId() . Company id can be obtained by calling ThemeDisplay

Liferay 6.2 How to display images stored in Documents and Media

…衆ロ難τιáo~ 提交于 2019-12-24 00:26:34
问题 I would like to know all possible ways of displaying a DLFileEntry image in a jsp of a custom portlet. More specifically, I currently use the following way but I have some issues with DLFileEntry objects that have zero values for 'largeimageid' DLFileEntry image = DLFileEntryLocalServiceUtil.getFileEntry(long_id); String imageUrl = themeDisplay.getPathImage() + "/image_gallery?img_id=" + image.getLargeImageId() + "&t=" + WebServerServletTokenUtil.getToken(image.getLargeImageId()); Which are

How to deploy a theme in liferay?

可紊 提交于 2019-12-23 05:32:19
问题 I am trying to check if my theme project is running with the different version. I downloaded all the versions that i need (6.2: ga1,ga2,ga3,ga4,ga5,ga6) and I configured the servers and the sdk for each server. I did (Import -> liferay projects from plugins SDK). In the import window I got a message: SDK version and Liferay runtime version may not be compatible. I imported the theme and I tried to deploy it (liferay -> deploy) but I got an error: Error running SDK command deploy java.lang

HttpClient 4.2.3 using both SSL encryption and NTLM authentication fails

对着背影说爱祢 提交于 2019-12-23 01:12:46
问题 I am trying to use a REST call to Sharepoint 2010 via HTTPClient 4.2.3 from a Liferay 6.1 portlet. I have imported the cert into my local MAC's JVM cacerts and am trying to load the cacerts as the keystore. My code is: String opsCalendarURL1 = "https://hostname/sites/team-sites/operations/_vti_bin/owssvr.dll?"; String opsCalendarURL2 = "Cmd=Display&List={6E460908-D470-4F8A-AF76-CC279E25E0B1}&XMLDATA=TRUE"; String opsCalenderURLEncoded = opsCalendarURL1 + URLEncoder.encode( opsCalendarURL2 ,

JSR 286 compliant namespace parameter

ε祈祈猫儿з 提交于 2019-12-22 18:13:16
问题 In portlet What is the best way to read namespace parameter in action method. My form contains <input id="<portlet:namespace/>param1" name="<portlet:namespace/>param1" value='hello'/> option1: request.getParameter(response.getNamespace() + "param1"); option2: request.getParameter("param1"); option1 does not work in liferay, but does seem will work in websphere. option2 works fine in liferay 6.2. option1 seems to work in before 6.1. Can anyone please tell me what is the jsr 286 compliant way?

File upload in specific folder of web application in liferay..?

╄→尐↘猪︶ㄣ 提交于 2019-12-22 11:06:49
问题 I am using liferay 6.0.5. I am uploading file using following code. UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest); String submissionFileName = uploadRequest.getFileName("file");//uploaded filename File submissionFile = uploadRequest.getFile("file"); this works fine and upload file in tomcat's temp directory with some different name. What I want is.."There is one folder docs in my project directory. I want uploaded file in this directory". How to do

How to get all logged in users list in Liferay?

馋奶兔 提交于 2019-12-22 10:50:52
问题 I want to get all users login detail as Administrator in liferay. User login from where is doesn't matter but i want to see list of all users which are login at a time. when user login it will send some identification to admin. 回答1: Control Panel's Monitoring option allows you to see all of the live sessions in the portal. For performance reasons, this setting is generally turned off in production. To enable display of live session data, set the portal property live.users.enabled to true. 来源: