liferay

Opening PDF file using window.open from server

牧云@^-^@ 提交于 2019-12-20 06:27:06
问题 I have a method which generates a PDF file and stores it in /temp folder. I am using tomcat. I want to open the PDF file. I have tried this using window.open method in the JavaScript. But on clicking the hyperlink it says the requested resource was not found. I store the PDF file in /temp folder using following line (of course the file gets generated and saved in the location): inputMap.put(TableProperties.PDF_PATH, "/temp/report.pdf"); Now in a JSP I try the following <tr> <td> <a href=""

How can I add a new language in Liferay 7?

老子叫甜甜 提交于 2019-12-20 02:43:09
问题 My problem is how to add new language like thailand language in liferay 7 . When I inspect the existing flag I see that the image is not png but it is svg, but I can't add new language with icon. In this page.jsp I see that the constructor of image is automatically generated. This code describes the generation of svg image <svg class="lexicon-icon lexicon-icon-<%= image %>" role="img" title="<%= HtmlUtil.escapeAttribute(LanguageUtil.get(resourceBundle, label)) %>" <%= InlineUtil

Liferay 6.1 portlet worked incorrect in 5.2.3

淺唱寂寞╮ 提交于 2019-12-20 01:59:24
问题 I have a portlet that worked fine on Liferay 6.1 portal but when I deploy it on Liferay 5.2.3 my configuration page did not even open. How should I make it work ? 回答1: Here is a nice authoritative answer to a very similar question. The portlets of newer versions are not designed to work on older installation of Liferay. Since they are compiled using the latest plugins-sdk and the also the different jars which have changed since the last version. So if you want the newer version portlet to

How can I open a pop up of my JSF portlet's edit mode?

假装没事ソ 提交于 2019-12-19 10:47:12
问题 When opening the configuration mode of a Liferay portlet it opens in a pop up dialog: How can I get my JSF portlet to open a similar pop up but for edit mode of my JSF portlet? I am using Liferay 6.2. 回答1: In Liferay 6.2+: For the most part, you can open edit mode of a JSF portlet the same way for both JSF and JSP portlets: via the client-side JS Liferay.Util.Window.getWindow() method. To create the dialog, you will need to get a render URL for the portlet in edit mode and pop up state via

How can I open a pop up of my JSF portlet's edit mode?

痴心易碎 提交于 2019-12-19 10:47:09
问题 When opening the configuration mode of a Liferay portlet it opens in a pop up dialog: How can I get my JSF portlet to open a similar pop up but for edit mode of my JSF portlet? I am using Liferay 6.2. 回答1: In Liferay 6.2+: For the most part, you can open edit mode of a JSF portlet the same way for both JSF and JSP portlets: via the client-side JS Liferay.Util.Window.getWindow() method. To create the dialog, you will need to get a render URL for the portlet in edit mode and pop up state via

Ajax in liferay portlet

走远了吗. 提交于 2019-12-19 10:29:18
问题 I have created one portlet in liferay(This is my first portlet). In that i have followed mvc structure of liferay. Java file for it as follows:- package com.liferay.samples; import java.io.IOException; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.PortletException; import javax.portlet.PortletPreferences; //import javax.portlet.GenericPortlet; import com.liferay.util.bridges.mvc.MVCPortlet; public class MyGreetingPortlet extends MVCPortlet {

Using custom services or liferay services in liferay themes (velocity templates)?

纵然是瞬间 提交于 2019-12-19 04:05:10
问题 How to use custom services method in liferay themes in velocity files like init_custom.vm , portal_normal.vm etc. I see liferay provides a lot of variables of helper utility classes like $portalUtil for PortalUtil, $getterUtil for GetterUtil and so on, inside the init.vm file. So is it possible to get instance of my custom services like an instance of com.my.custom.service.MyCustomLocalServiceImpl or services of liferay from UserLocalServiceImpl ? Here is some psuedo code, to give an idea of

How to customize which portlets to show in “Add more portlets” menu

痞子三分冷 提交于 2019-12-19 03:18:08
问题 I need to customize as to which portlet appear in the "Add more portlet menu" as shown in the image below: I need to restrict the number of portlets displayed in this menu based on the logged-in user or site (community). So that Site-owner or Site-admin will be able to add only those portlets to their pages which the omni-admin decides for them. Does Liferay provide any such functionality (through configuration or something) or do I have to create a new portlet and a hook to achieve this?

How to customize which portlets to show in “Add more portlets” menu

杀马特。学长 韩版系。学妹 提交于 2019-12-19 03:18:01
问题 I need to customize as to which portlet appear in the "Add more portlet menu" as shown in the image below: I need to restrict the number of portlets displayed in this menu based on the logged-in user or site (community). So that Site-owner or Site-admin will be able to add only those portlets to their pages which the omni-admin decides for them. Does Liferay provide any such functionality (through configuration or something) or do I have to create a new portlet and a hook to achieve this?

Is it possible to add Extra Fields Under Create User in Liferay

你离开我真会死。 提交于 2019-12-18 11:57:41
问题 I am using Liferay 6 for portal Development . During Creating Users under Liferay , i need to add some extra Fields also ?? Please let me know if this is ppossible or not ?? Please see the screen shot attached here , and also please let me know in which table this will be stored in Database ?? 回答1: Yes, you can use Custom Attributes functionality for liferay entities (in your case, User) and can add as many extra fields as necessary for each liferay entity. Custom field for the user-entity