liferay

Liferay : Portlets inside portlet

强颜欢笑 提交于 2019-12-05 14:21:18
Is it possible to create a few portlets inside a portlet? I mean a multilevel portlet. p.mesotten Yes. You can use the Nested Portlet to this purpose. This is a layout container for other portlets. You can choose the wanted layout in the configuration. Yes, definately, you can have portlet within portlet. Liferay provides taglib, thru which you can easily embed different util portlets (web content display, breadcrumb, navigation etc) within portlet NESTED-PORTLET Assuming that you are talking about a framework, a platform or something similar, yes, it's possible. Look if your framework have a

Multiple Ajax calls liferay portlets

余生长醉 提交于 2019-12-05 12:10:41
I am having liferay portlet and I need to heavily depend upon the AJAX calls. So I need to make multiple calls to serveResource method. One way to do the same is that I can pass a parameter with the URL and then differentiate the request according to that parameter. But in my case I have to call serveResource so many times due to which the method will be difficult to maintain. Is there any framework to do so? Using which the code becomes maintainable. Use Spring MVC framework and call different method based on your business logic/user action in controller, Try below code in jsp <portlet

Hibernate: No CurrentSessionContext configured

ぃ、小莉子 提交于 2019-12-05 11:59:59
问题 I keep getting a : HibernateException: No CurrentSessionContext configured! in my code. The only information other searches that returned is that the culprit is: <property name="current_session_context_class">thread</property> in my hibernate.cfg.xml. I do have that in my hibernate.cfg.xml file, and I am running this in Tomcat 6. Does anyone know other possible causes? 回答1: I believe you need to set your current_session_context_class to an actual class...I have my hibernate.cfg.xml configured

Liferay ajax request and JSON response

对着背影说爱祢 提交于 2019-12-05 10:39:17
I am new in Liferay. I used service builder to create database. I populated them manually. And eventually I could call them in JSP using PersonLocalServiceUtil class . Now I want to use Ajax in my program. For example: Person with attributes personID , personWeight , personTemperature and datetime are stored in database. I want to do an ajax call by personID to see his weight or Temperature graph for particular timeline. All I know, I can call list from Database to controller But I don't know How can I convert it to JSON obejct and forward it to JSP upon request, so that JSP won't refresh the

Bootstrap modal in Liferay

一世执手 提交于 2019-12-05 09:57:49
I use Bootstrap 2.3.2 and Liferay 6.2 bundled with Tomcat. I have some modal windows with complex body structure created in Bootstrap 2.3.2 and I would like to use them in my portal. Here is said that Liferay uses Bootstrap 2.3.2 css, but not Bootstrap 2.3.2 javascript and components like modals, tooltips, tabs, ... are included in AlloyUI. I included Bootstrap 2.3.2 javascript and tried to use my modal windows, but if I want to show a modal window it doesn't appear. I would like to ask, how can i show native bootstrap modals in Liferay. The reason that your modal is not appearing is most

Integration of Grails into Liferay

梦想的初衷 提交于 2019-12-05 08:08:35
问题 I wanted to integrate Grails into a Liferay portlet. I saw that a plugin for that purspose exists (http://www.grails.org/plugin/portlets-liferay) but the documentation is not very helpful. I only want to start with it, so I create a simple Hello World aplication in Grails (http://grails.org/doc/latest/guide/2.%20Getting%20Started.html#2.4 A Hello World Example) and I want to include it in a Liferay portlet. Which commands or configuration modifications have I to do? 来源: https://stackoverflow

Set Liferay Hook on session timeout

匆匆过客 提交于 2019-12-05 08:08:16
问题 I want to write a Hook in Java that is executed if the session of my Liferay 5.2.3 Portal times out. I managed to write a Hook that is executed whenever the user clicks the logout link with the following setup in the liferay-hook.xml : <hook> <event> <event-class>com.extensions.hooks.LogoutHook</event-class> <event-type>logout.events.pre</event-type> </event> </hook> However the Logout Hook does not get called if the session times out, but I need to execute the same method on a timeout. I did

How to share jar within multiple portlets?

瘦欲@ 提交于 2019-12-05 08:02:07
I'm using several jars in my portlets, for instance c3p0. Now I want to avoid to put the jars in every of my portlets lib folders. How can I share one jar file within multiple portlets? And how should I integrate them in the Eclipse IDE? Add an external jar or put them in one dedicated project and include them from there? Another solution would be to put them under ../liferay-portal-<version>/tomcat-<version>/webapps/ROOT/WEB-INF/lib If you place them here you can add the JAR as a dependency for your portlet in the portlets liferay-plugin-package.properties (if you're using Liferay Developer

How to support file upload in web-form Liferay 7?

 ̄綄美尐妖づ 提交于 2019-12-05 06:27:36
I need a simple extension for Liferay web form to enahance file attachment to data flled in a liferay 7 web form. Also need to sent this file as an attachment with the email to the registered user. I know how to achieve this functionality in liferay 6.2 but not about liferay 7. I am using liferay 7 GA-5 CE. Any help appreciated. You need to create a custom form field type plugin, please find liferay wiki here Creating Form Field Type . and follow below steps, Change input type to file in soy file path is src/main/resources/META-INF/resources/your-plugin-type-name.soy Create a fragment of

Java : Getting the article id from a web content portlet

蹲街弑〆低调 提交于 2019-12-05 06:24:28
问题 I have two portlets on my web page : The first one is a web content portlet that allows picking up an article and displays it. The other one is the portlet I'm working on (Struts MVC). What I want to do in the second portlet is to get the article id used to display the web content in the first portlet. Is it possible ? Thank you! 回答1: You can do it using some Liferay specific APIs, though the approach is not perfect, but it'll work. You can use Liferay APIs to get list of portlets currently