liferay

Liferay Service Builder 6.2: Many to one relationships

一世执手 提交于 2019-11-28 00:35:00
问题 I want to create a one to many relationships and I've used the following service.xml: <entity name="Student" local-service="true" remote-service="true" cache-enabled="false"> <column name="studentId" type="long" primary="true" /> <column name="courses" type="Collection" entity="Course"/> </entity> <entity name="Course" local-service="true" remote-service="true" cache-enabled="false"> <column name="courseId" type="long" primary="true" /> <column name="studentId" type="long"/> </entity> My

How to find portlets added on a particular page in Liferay?

老子叫甜甜 提交于 2019-11-27 23:38:53
问题 How can I find which portlets are added on a particular Liferay page? For Example: I have three pages: Welcome , Wiki and Search . Now all these pages have portlets added on them and some of them are instanceable portlets (like web-content display and iframe portlets). Now I want to pass some information in the form of request parameters to the iframe-portlet on the Search page from the Welcome page . 回答1: I have found two ways to do this: If you want to find the portlets on the same page in

How to submit form using Ajax request in Liferay?

非 Y 不嫁゛ 提交于 2019-11-27 18:51:11
I am newbie in liferay portal. I have developed one portlet in liferay for demo. I used inter portlet communication in this example. What i am doing is:- I have one search portlet in which i am having one textfield for search. When i click on search button it fetches the data from the database and display that data using search-contained in another portlet. I used ProcessEvent and ActionEvent annotation for this project. Now what i want is when i click on the search button then the page should not be refresh(i.e i wish to use the concept of AJAX) and data should be displayed on the other

memberOf vs. groupMembership in LDAP (Liferay)

女生的网名这么多〃 提交于 2019-11-27 18:20:21
问题 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? 回答1: memberOf is not a "variable", it is an

PortletURL to open another portlet in pop-up

拟墨画扇 提交于 2019-11-27 15:14:31
I have a hook for create_account.jsp . In this jsp I have a javascript code where I try to open a portlet in an iframe pop-up or some pop-up from Liferay. The question is: How to give the portlet URL? How can I access it? In that portlet I only want to ask a question with YES or NO, and based on the user answer, redirect to some other page. To create a URL, you can either use <portlet:renderURL> or <liferay-portlet:renderURL> <liferay-portlet:renderURL var="testPopupURL" portletName="testPopup_WAR_testPopupportlet" windowState="<%=LiferayWindowState.POP_UP.toString() %>"> <liferay-portlet

Liferay: How to configure Liferay Portal

非 Y 不嫁゛ 提交于 2019-11-27 14:30:17
How to configure or to override Liferay portal properties with portal.properties ? Mark Liferay properties is powerful instrument that allows us to configure Portal behaviour without coding of hooks-, ext- and theme-plugin. By new requirement we proof at first for possibility to solve this requirement with change of Liferay configuration. The default properties configuration can be found at Liferay source code: https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal.properties or in https://github.com/liferay/liferay-portal/blob/master/portal-impl/src/portal.properties or

[转]在Liferay开发中如何避免使用EXT插件

天大地大妈咪最大 提交于 2019-11-27 14:01:51
尽可能使用hook代替ext 假如你需要覆盖诸如 *ServiceImp l类, 比如 UserLocalServiceImpl类,可以扩展UserLocalServiceWrapper ,重写你想要的方法, 然后在 liferay-hook.xml中进行如下的声明: <hook> <service> <service-type>com.liferay.portal.service.UserLocalService</service-type> <service-impl>com.liferay.testhook.hook.service.impl.TestUserLocalServiceImpl</service-impl> </service> </hook> 其中 public class TestUserLocalServiceImpl extends UserLocalServiceWrapper { // override what you want ... } 如果你需要覆盖在liferay-hook.dtd文件中声明的类或添加event action, 比如你希望覆盖 ScreennameValidator, ScreennameGenerator, 或者添加postLoginActions, servicePreActions等, 可以在portal-ext

【转】 liferay5.1.2 笔记

你。 提交于 2019-11-27 14:01:34
一、 HttpSessionListener <listener> <listener-class>com.liferay.portal.kernel.servlet.PortletSessionListenerManager</listener-class> </listener> 在 liferay 中,使用 PortletSessionListenerManager 实现 HttpSessionListener 。 二、 ServletContextListener 接口的实现与应用 ServletContextListener 接口有两方需要实现的方法 :contextInitialized() 和 contextDestroyed(); 它会监听 Servlet 容器 , 当应用开始的时候它会调用 contextInitialized() 方法 ; 当应用关闭的时候 , 它同样会调用 contextDestroyed() 方法 . ServletContext 对象是一个为整个 web 应用提供共享的内存,任何请求都可以访问里面的内容。 如何实现在服务启动的时候就动态的加入到里面的内容:我们需要做的有: 1 ) 实现 servletContextListerner 接口 并将要共享的通过 setAttribute ( name,data )方法提交到内存中去。 2

Liferay7的环境搭建

♀尐吖头ヾ 提交于 2019-11-27 14:01:24
公司主管建议我用Liferay来做公司的门户网站。现阶段公司的门户网站,每次有新的需求,需要重新编写代码的方式,与业务太耦合了,需要重构。他以前的公司就是用这个开发的。 因为是全新学习,所以就直接跳过6.2的版本了。现在最新的是7的版本,貌似还不太稳定,相对6.2来说的话。环境的搭建就比较麻烦。 主题搭建的链接 想把liferay和spring,spring mvc结合起来,这样我觉得就能提高开发效率了。因为对于spring大家总是比较熟悉的。 这几天遇到瓶颈了,就是没有什么进展,在知识储备期。 来源: oschina 链接: https://my.oschina.net/u/1585200/blog/790068

Liferay6.1学习笔记(三)--Autodeploy自定义的portlet

佐手、 提交于 2019-11-27 14:01:10
注: 由于官方的很多主题不支持6.2版本,所以现在使用的是6.1.2版本。 eclipse中新建一个portlet project后,在project中新建自定义的portlet。 打开servers窗口,将portlet项目deploy到tomcat中。 右键点击portlet项目选择Liferay->SDK->deploy,则portlet最部署到正在运行的Liferay Portal当中,进入Portal页面则可选择使用该portlet。 来源: oschina 链接: https://my.oschina.net/u/199525/blog/191802