Category: Liferay Development

Create Finder method for Service builder in liferay

Finder method in Liferay provides facility to add customization in service layer. Finder method allows to define custom methods which is used to fetch data from DB for different table column. In my last article on Creating Service layer with Service builder in Liferay we have seen how  to create service layer for each entity in…

Creating Service layer in Service Builder in Liferay

Service builder is an automated tool to construct service and persistence layer in Liferay. We need to define business models (entities) and rest is taken care by service builder. Service Builder is one of the most powerful, time saver, proven and peace of mind feature of Liferay. what is Liferay Service Builder ? Liferay provide nice…

Multiple render method in Liferay MVC Portlet

Multiple render in portlet is used to show different views. This is required when different actions requires different results to show. Many times we need different views to display the output after various action performed. In liferay MVC view.jsp is use to render portlet output. Let us see by example. Suppose, our portlet shows the…

Call Portlet Action Method From Another Portlet On Different Liferay Page

Sometimes, we need to call portlet action method from another portlet which may be on same or different Liferay page. For this we need to construct action URL through Java API which points to target portlet. In this article, we will see how to achieve this. To understand it properly, let’s take a real example. Assume…

How to create multiple portlets in single Liferay plugin project

Liferay Plugin project can be created in Liferay IDE. We can add multiple portlets in single liferay plugin project. They all combined in single WAR file. So far we have seen that whenever we need to create a portlet, we are creating one plugin project. It’s possible to have multiple plugins (like portlets,hooks, layouts and…

Configure Liferay with My SQL or any other Database rather than HSQL DB

Liferay by default comes with HSQLDB configured. HSQLDB is generally used for development purposes and it’s not recommended for Production. If you observed the Liferay server log then you will come to know that Liferay will put log something like “Liferay is configured to use Hypersonic as its database. Do NOT use Hypersonic in production.…

Server Side Validation in Liferay

Validation is an essential part of any framework or tool. Validation can be done at client side (through JavaScript) and server side. In this article, we will see how to do server side validation for Liferay portlet. For simplicity, I choose SpringMVC portlet to demonstrate server side validation. You can use this blog to perform validation on Liferay…

Render and Action methods in Spring MVC portlet in Liferay

Spring MVC Portlet in Liferay provides facility to define multiple render and action methods. Liferay MVC portlet however allow one render method and multiple action methods. In this article, we will see how to write multiple render and action methods in Spring MVC portlet created in Liferay. This article is an addendum of my previous blog Spring…