FAQ Database Discussion Community


DLFileEntry size in the memory

java,memory,liferay,portlet
Can someone tell me what is the size of a DLFileEntry record in the memory? I'm holding a List of DLFileEntries and I want to be just sure that my portlet won't have a memory issue after deploying it on a server, operating with a large number of records. Or...

How to update the portlet view with a web page?

java,liferay,liferay-6,portlet
In my application, I need to access the remote applications (The application which is running on other tomcat instance) dynamically in my portlet. So I have created the portlet in view and edit mode so that I am able see the "preferences" option in portlet setting options. my preference page...

Data migration from liferay portal to websphere portal

migration,liferay,portlet,websphere-portal,ibm-connections
i need to migrate the content of the list below from liferay Portal to WebSphere Portal. and we will use IBM Connection for the portlets. a. Calendar. b. Discussion Boards/Blogs/Forums can anyone give me an API that can be use for migrating the data? I have an options here but...

Liferay Portlets Best Practices and Coding Guidelines

liferay,portlet,guidelines
We are a groupe of studends which have gotten the task to develope a bunch of Portlets for Liferay. The Liferay Portlets have to have a specific code quality. And since non of our groupe has experience, it would be nice if some experts could share there knowlage or post...

Can't get the liferay login user details in portlet

liferay,liferay-6,portlet,liferay-theme
I have one proxy portlet and one Generic portlet. Here I am sending Post data from proxy portlet to generic portlet. While sending the data I use post method and sending to the view.jsp page. In view.jsp I am able to get the form data through input stream. Now the...

jsp losing attribute passed from the backend

java,html,jsp,liferay,portlet
I've got a problem in my project. This is a part of my code, which I think is causing the problem. @Override public void dLMSreceiveInput(ActionRequest actionRequest, ActionResponse actionResponse) throws ParseException { dynamicLogic = actionRequest.getParameter("setlogic"); logic = actionRequest.getParameter("outerlogic"); PortletPreferences prefs = actionRequest.getPreferences(); dLMSSendRender(dLMSCreateQuery(actionRequest), actionResponse, actionRequest); } public void dLMSSendRender(List<DLFileEntry> foundFiles, ActionResponse...

How to pass data from page to Portlet class through AJAX call?

ajax,jsp,liferay,portlet
I'm trying to pass a value in an AJAX 'GET' request to my Portlet class, but I can't quite figure out a way to access such variable's value in the class. My AJAX code is: function loadXMLDoc() { var nocache = new Date().getTime(); var xmlhttp=new XMLHttpRequest(); var url = "${mURL}";...

Portlet event send array of objects

arrays,events,liferay,portlet
We have multiple projects with multiple portlets and need to send an array of objects between them. Our situation: One of the porlets is like a "Master-portlet", it will be responsible for all the REST-calls and consume json-data and parse it to Java-Objects. All the other portlets will receive an...

liferay portlet non-liferay JNDI data source null

oracle,tomcat7,jndi,liferay-6,portlet
For a Liferay 6.2 custom portlet accessing a non liferay Oracle database we are running into an issue where the data source returned is null. We have configured the tomcat/conf/context.xml <!-- Adding custom New non liferay datasource --> <Resource name="jdbc/NewPool" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST...

No handler found for portlet request: mode 'view', phase 'RENDER_PHASE'

portlet,spring-portlet-mvc
I develop a portlet in Spring MVC which is deployed in Liferay. Apparently, I have a problem with render phase of view mode of portlet. Controller for view mode package graphui.controller; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.portlet.ModelAndView; import...

Overloading web content Portlet in Liferay

java,jsf,liferay,portlet
In Liferay, when you add a web content to a page, a Portlet is created and you can choose the web content that will be displayed (when logged as admin), and you can choose some parameters (rights to view the content, share...). I would like to create a Portlet that...

Is there a way to get a deployed war from a running Liferay?

liferay,war,portlet
A version of a portlet I'm working on is already deployed to liferay. Is there any way to get that originally deployed war from a running liferay instance? This is so I could hot-deploy my version and shortly deploy the old version. The original was deployed by Jenkins. Liferay 6.1...

Register multiple EventHandlers for one portlet

event-handling,liferay,portlet
I would like to register more than one EventHandler in a Portlet in my portlet.xml. Right now it looks like this: When trying to add a second block of init-param i get an error: Than i tryed to add multiple EventHandler in one init-param block, but i get this error:...

Liferay portlet deploy timestamp

liferay,portlet
I need to include some javascripts in jsp pages: <script type="text/javascript" src="<%=request.getContextPath()%>/newsletter/js/newsletter.js"></script> When I deploy a new portlet version and I change this js file, some users see the old version of this file. I saw that Liferay adds last deploy timestamp to javascripts (...js?t=14573725543), and I can do it...

Can I create a Java Portal (JSR 168/286) using only an application server (Tomcat, JBoss, etc)?

java,liferay,portlet,ibm-was,jsr286
I want to create a lightweight portal using the Java specification. I want to be able to deploy the same portal project in different application servers (in this case WebSphere, Tomcat and JBoss). I've checked products like Liferay, but I want to create my own framework and interface, and just...

Ajax sends null data into controller

ajax,spring-mvc,liferay,portlet,spring-portlet-mvc
I have a liferay portlet and use Spring MVC. I want to use Ajax to send a basic object into controller. The problem is that controller receives only null object. index.jsp <[email protected] contentType="text/html" pageEncoding="UTF-8"%> <%@ page import="graphui.GraphUIConstants" %> <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">...

How to render a web page in a portlet view

liferay,liferay-6,portlet,jsrender,jsr286
Can any one please guide me that how can we render the custom web page view in the portlet. i.e, I have a input text box in my where user can enter the target URL and on click of the submit button the portlet content should display the target URL...

Form submit portlet with Spring MVC

java,jsp,spring-mvc,liferay,portlet
I'm trying to achieve a Liferay portlet of submit form using spring MVC. The model: package com.model; public class Person { String firstName; String middleName; public String getFirstName() { return this.firstName; } public String getMiddleName() { return this.middleName; } public void setFirstName(String firstName) { this.firstName=firstName; } public void setMiddleName(String middleName)...

How to pass HTTP request to Web-Service

ajax,web-services,liferay,liferay-6,portlet
From my portlet JSP, I am trying to make a Ajax call to web-service. My aim is to pass HTTP request object as a parameter to web-service method. Please suggest.

Documents and Media file view link

java,liferay,portlet
Is there a way to obtain an URL to open document in Documents and media portlet? Not to directly download it, but to open a document view. E.g. I have got a DLFileEntry object in my potrlet, after clicking a view href link, it opens a view of this entry...

Which one will be invoked first? doHeader or doView

java,java-ee,portlet
When hitting a portet in the view mode which method will be invoked first by the portlet container..? will it be doHeader or doView..?

Share Session between liferay portlet and servlet

java,session,servlets,liferay,portlet
I'm trying to share a session between a liferay portlet and a servlet, running in the same WAR. I'm setting the attribute like this in the LoginPostAction (Hook): @Override public void run(HttpServletRequest request, HttpServletResponse response) throws ActionException { Gebruiker g = new Gebruiker(); request.getSession().setAttribute("gebruiker", gebruiker); } Trying to get this...

Liferay Inter Portlet Communication in JSF 2.0

jsf,jsf-2,liferay,communication,portlet
I'm developing liferay jsf portlet application and using liferay plugin sdk 6.2.0 and primefaces. I have two portlets in same portlet plugin project. I can do IPC with public render parameters but they should be same portal page. I tried to event mechanism but I couldn't succeed. Receiver event didn't...

liferay portlet: access forbidden after time period for guest user

jsp,liferay,portlet
I created a portlet on Liferay 6.1, JBoss 7 for guests. It needs to work for the user even if he hasn't made an action for a long period of time. Actual if I do something in my portlet and wait for about 10 minutes and then do something again...

JSF + Liferay: Cannot send parameters from a bean to another

jsf,liferay,portlet
I've tried all methods, nothing works, in the destination @PostConstruct the parameter is null. I am sending a redirect from BeanA to a page (backed by BeanB) and trying to extract the parameter from BeanB. The requirement is to not add the parameters to the URL. I tried all methods:...

Getting response form custom @proceesAction in WebSphere Portal Portlet

java,javascript,servlets,portlet,websphere-portal
i am developing a Portlet in WebSphere Portal 8 and i am having problems to get the response from a custom @processAction method, the method is called and executed, but in the jsp i cant get the data returned... I have a jsp file wich has: -definition of portlet actionURL......

Verify in another portlet-A whether the portlet-B is deployed or not

liferay,liferay-6,portlet
Requirement JSP code in portlet-A's JSP includes another portlet as: <liferay-portlet:runtime portletName="portlet-B_WAR_portletbportlet" /> If portlet-B is undeployed it shows a message - portlet-B is unavailable. We need to check when portlet-B is unavailable and do some other functionality and show some other stuff Question Is it possible to check in...

Issue while deploying the Orbeon Form builder portlet

ant,liferay,liferay-6,portlet,orbeon
I want to deploy the Form Runner separately, For the same reason I tried to create the proxy-portlet with reference to the following link, https://github.com/orbeon/orbeon-forms/wiki/Form-Runner-~-Portal-~-Liferay-Proxy-Portlet-Guide. I tried the following command to generate the Proxy-Portlet, ant proxy-portlet-war The build gets success and generated the war file (orbeon-4.7.0.pre.20150129-proxy-portlet.war) then I renamed the...

How to get Liferay login user details in servlet(Portlet)?

session,servlets,liferay,liferay-6,portlet
I have deployed my application as a porlet on Liferay, Now I need to perform session management while performing the business logic (in servlet). Let's say I have deployed my servlet on liferay. I am using liferay 6.2, Tomcat 7, I am submitting one form to servlet before performing the...

Portlet aware of other portlets on the same page

jsf-2,portlet,websphere-portal,jsr286
i am tasked to develop an "action portlet" that contains the actions (e.g. h:commandLink) for all other portlets on the same page. Now these actions should only be available if the corresponding portlet is actually present on the same page. Is it possible for a portlet to "know" which other...

Where can we get the liferay Iframe portlet source code?

iframe,liferay,liferay-6,portlet,spring-portlet-mvc
I need to a portlet to access the remote applications. So I need the Iframe type portlet. I have tested the I frame on liferay portal. I need the source code of the Iframe portlet, so that I need to customize it as required and ddeploy the same on to...

Change database in Liferay with losing any data

liferay,hook,liferay-6,portlet,liferay-theme
As of today, I am developing the liferay portal enhancements with default hsql database. I have implemented many features and created multiple sites and site templates with different roles and user. 1) Now I want to change the database from hsql database to PostgreSQL. Now how can I change the...

can't handle portlet action phase

controller,liferay,portlet,spring-portlet-mvc
I have a basic Liferay portlet and use Spring MVC. I have only one controller for VIEW mode of portlet and only one form. When I submit the form, action phase is not handled. GraphViewController.java package graphui; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import...

How to add preference option to the liferay portlet

liferay,liferay-6,portlet,portal
I want to create a portlet where the portlet allow access to the remote application. That is the content of the portlet should be dynamic so for the same reason I want to add one option "Preferences" in the portlet (Where the look and feel and configuration options exists). In...

Portlet IPC after recieved Event

jsf,events,event-handling,ipc,portlet
I have a Navigation portlet which schows all Students, when a Student gets clicked im sending a event with the id of the clicked student to other portlets. Sending and receiving the event is not the problem, that works fine. What i don't get, is how to proceed with the...

How to call Generic Portlet methods from servlet?

java,servlets,liferay,liferay-6,portlet
I have created a portlet and able all my business logic is performing in a servlet. I need to get the liferay login user details in the servlet. SO I have created a class which will extend the GenericPortlet. Now My question is how can I call that class I...

How manage styles in Vaadin portlet in Liferay

css3,liferay,vaadin,portlet
I have a Portlet, where is used Valo theme. Most graphical components are displayed properly, but TextField not. It should have rounded border radius and height should be about 35px. It has normally about 15px and the field is angular. When I narrow width of browser window to about 200px...

Auto deploy Liferay portlets in Netbeans

tomcat,netbeans,liferay,liferay-6,portlet
how do you automatically deploy Liferay portlets in Netbeans? Every time I build a project, have to copy .war file to Tomcat deploy directory in Liferay. Is it possible to deploy .war file automatically, when project is built?

Set setcontenttype in action mapping?

liferay,liferay-6,portlet,content-type
Can anyone tell me how i can set content type to "UTF-8" using action response like resource Response? I dont see any setContentType for actionResponse. In Resource Mapping we can do it like resourceResponse.setContentType("text/html; charset=UTF-8"); I also tried to encode the string using . messageToCust=new String (messageToCust.getBytes ("ISO-8859-1"), "UTF-8"); Is...

Spring Portlet + Thymeleaf: Bind object for ActionMapping

spring,spring-mvc,portlet,thymeleaf
I've a problem with a Spring 4 Portlet using the template engine Thymeleaf. I want to convert an existing servlet which is working fine to a portlet. I use Thymeleaf for editing objects in forms in JSP-files. <form method="POST" th:object="${object}" th:action="${portletActionURL}"> <input th:field="*{objField}"/> ... <input type="submit"/> </form> portletActionURL is a...

commandButton action method not invoked in Liferay

jsf,liferay,portlet
I've the below portlet view.xhtml: <?xml version="1.0"?> <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui"> <h:body> <h:form> <h:commandButton value="TESTButton" action="#{navigationViewBean.submit}" /> <h:outputText value="TESTGetter: #{navigationViewBean.testField}" /> </h:form>...