liferay

How to create a download button for multiple files using Liferay and JavaScript?

天大地大妈咪最大 提交于 2019-11-29 12:36:12
I am trying to make a button when clicking, it downloads the files in a zip file. I tried to load the files into the Zip from given url. I am using Liferay 6.1 . Is the script declaration in the JSP file correct? I have already specified jszip.js in liferay-portlet.xml. <footer-portlet-javascript>/js/jszip.js</footer-portlet-javascript> Do I have to use the Liferay AUI Taglib tag or a simple javaScript tag should do the work? <aui:script></aui:script> or <script type="text/javascript"></script> or liferay-portlet.xml Is my script to download multi-files correct? <c:if test="<%= multi_files

Programmatically get the url of a page in liferay

雨燕双飞 提交于 2019-11-29 11:22:43
问题 I want to create a link in a portlet so that I can navigate to a different page in the liferay portal. I order to do that I am looking for an API (can be liferay specific) that given a page name, would return it's url (it can be the friendlyURL as well). 回答1: The API to access pages in Liferay is the LayoutService. However, page names are not unique in Liferay and furthermore they are internationalized. So you need some unique property for a page to retrieve its url, besides its name. If you

How is the Tomcat temp directory location defined?

杀马特。学长 韩版系。学妹 提交于 2019-11-29 10:36:22
I am running Tomcat bundled with Liferay5.2.3 and use Eclipse 3.5 (Galileo) as my IDE. I set up my Tomcat server in Eclipse as per this blog entry: http://www.jroller.com/holy/entry/developing_portlets_for_liferay_in . If I start Tomcat via the Eclipse server config, Liferay/Tomcat uses my C:\Documents and Settings\user\Local Settings\Temp\ directory. However, if I start Tomcat directly using the startup.bat script, Liferay/Tomcat uses the Tomcat temp directory. I can't figure out if Eclipse, Liferay or Tomcat is deciding which temp directory to use or how to change it. I would prefer to use

How to create a top-level servlet in liferay

元气小坏坏 提交于 2019-11-29 10:22:23
I wanted to create a servlet in liferay that is listening to a URL such as http://localhost:8080/my-servlet I tried to add it to a portlet but the I have the URL http://localhost:8080/my-portlet/my-servlet I tried to add my servlet description to the web.xml of ext-web, but no luck. Is there any way to add such a servlet ? Liferay is also "Servlet"-Application - but a very-very big one. And Liferay need some servlet container like tomcat, jetty, jboss etc. However, you can simple create servlet project and deploy it direct to servlet container where liferay is running. edit: and put to web.xml

Authentication and authorization in REST Services with Liferay

你说的曾经没有我的故事 提交于 2019-11-29 07:43:54
We are building some services that will be exposed through a RESTful API. Primary customers of this API are Liferay portlets using Angular JS, meaning there are direct calls from client-side (Angular) to our services. So far we have designed an authentication and authorization mechanism to assure that we can identify which logged user (Liferay) is requesting our API . PS.: note that although we are using Liferay, it could be any other Java based application instead. What we have designed is: When the user logs in in our portal, Liferay creates an authentication token with userLogin (or ID) +

How can I check the version of a Liferay instance?

怎甘沉沦 提交于 2019-11-29 05:36:18
问题 I have several instances of Liferay Portal (bundled with Apache Tomcat 5.5.x/6.x) and I need to know how to check the version of those Liferay instances . Thanks in advance. 回答1: As an administrator, go to: Control Panel -> Configuration -> Server Administration The version is in the information banner at the top of the "Resources" tab. 回答2: You can also check that information in the console log when starting up the server or checking the the headers of a HTTP request 回答3: Look at class com

memberOf vs. groupMembership in LDAP (Liferay)

左心房为你撑大大i 提交于 2019-11-29 04:35:25
What is the difference b/n memberOf attribute and groupMembership attribute when used in LDAP Authentication settings in Liferay? The users are imported successfully. The groups are also imported successfully. But the users are not assigned to the groups automatically. And when I changed the group variable from 'groupMembership' to 'memberOf', several users are not able to login to Liferay. What exactly are memberOf and groupMembership variables? memberOf is not a "variable", it is an attribute, or more accurately, it is a virtual attribute, or a dynamic attribute generated on the fly by some

How to show error message in liferay portal?

非 Y 不嫁゛ 提交于 2019-11-29 03:24:03
How to show error message in liferay portal? I read on liferay.com site that for show error message I can use liferay-ui:error tag from tag library, but it's not working, how to use it? Jonny You are right in about "liferay-ui:error" tag so on your JSP you will have: <%@ taglib uri="http://liferay.com/tld/ui" prefix="liferay-ui" %> <liferay-ui:error key="some-error" message="Your error message goes here!" /> Then in your Java code you will need either the RenderRequest or ActionRequest normally however any type of HTTPServletRequest or PortletRequest can also be used. Then you pass your

Liferay开发学习Part5:更改数据库为MySQL

自古美人都是妖i 提交于 2019-11-28 20:07:48
Liferay中自带有一个示例数据库(HSQL),如何更改为自己想要的数据库呢? 一.删除示例数据库 [liferay-home]/tomcat-[version number]/webapps\sevencogs-hook 将该目录移除(备份到别的地方而非删除) 二.安装MySQL,创建数据库lportal 三.连接Liferay和MySQL 1.[liferay-home]/目录 新建文件portal-ext.properties 因为该文件的优先级高于默认配置文件,因此将覆盖原文件中liferay与HQL连接 2.portlet-ext.properties文件内容 # # MySQL # jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.url=jdbc:mysql://localhost/lportal? useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false jdbc.default.username=你的用户名 jdbc.default.password=你的密码 3.关于JDBC驱动 Liferay已自带MySQL JDBC驱动,位于[Tomcat Home]/lib/ext/mysql.jar

liferay整理(留着备用)

放肆的年华 提交于 2019-11-28 20:05:56
Liferay 6.1开发学习(二十): Dynamic Query 高级查询 在上一篇的博客《 Liferay 6.1开发学习(十九):Liferay ServiceBuilder之自定义查询 》之中介绍了一部分简单的 Dynamic Query 方法,可以满足简单的条件查询,但有些场景这样的查询不能满足我们的需求,同时使用HQL可能有稍显麻烦,在这里介绍一些 Dynamic Query 的高级技巧。( Dynamic Query 的查询持续更新到此篇博客) Group By 查询 在 Dynamic Query 中实现group by的查询其实非常简单,示例代码如下: DynamicQuery�0�2 query �0�2=�0�2this.dynamicQuery(); �0�2�0�2 ProjectionList�0�2list�0�2=�0�2ProjectionFactoryUtil.projectionList(); �0�2�0�2 list.add(ProjectionFactoryUtil.rowCount()); �0�2�0�2 list.add(ProjectionFactoryUtil.groupProperty("bookNo")); �0�2�0�2 list.add(ProjectionFactoryUtil.groupProperty(