Wednesday, October 28, 2015

Quartz Scheduler in Liferay


Today we will discuss about Schedular in Liferay. Sometime we have a situation in which we have to perform a task repeatedly after a certain period of time.Ex- Send a mail every week.

Liferay provide a simple way to achieve this.We create schedular class and provide entry of timing in liferay-portlet.xml. Time for schedular can be define by 3 ways:-
Continue Reading...

Friday, October 23, 2015

Send Redirect in Liferay


Today we will discuss how to redirect from a portlet to another portlet which are placed on some other page. For this we need two things:-

1)Portlet Layout Id(plid)
We need the plid of the page where we want to redirect.We can get the plid by the page name as:-
Continue Reading...

Wednesday, October 21, 2015

Inter Portlet Communication(IPC) in Liferay


Inter Portlet Communication ie IPC is needed when we have to communicate between two portlets. Some times these portlets are on same page sometimes they may be on different page. 

Example:- We have a drop down in one portlet by which we can select country name and another portlet display the currency, states, national flag, climate on the basis of country selected by first portlet. In this case we have to send value from first portlet to another.


Continue Reading...

Tuesday, October 20, 2015

Client Side Inter Portlet Communication in Liferay


Today we will discuss Client Side Inter Portlet Communication in Liferay . In my opinion it is the simplest way for sharing data between two portlets which are on same page. Liferay provide two basic methods for this:-

1)For Client

Liferay.fire('eventName',{
            parameter1: value1,
            parameter2: value2

    });

2)For Receiver

 Liferay.on('eventName',function(event) {
   var firstValue = event.parameter1,
   var  secondValue = event.parameter2

});
Continue Reading...

Friday, October 16, 2015

Inter Portlet Communication (IPC) using Events in Liferay


We already know IPC using public render parameters  .Today we will see how to do IPC using Events. Events based IPC was introduced in JSR 286 or we can say in Portlet 2.0. According to this a new method processEvent introduced in Life Cycle of Portlet.Here one Portlet can Produce a event which can be consumed by other portlets.

We take a simple scenario where user can select food type from one portlet and second portlet shows food items on the basis of first portlet. This is a Sender, Receiver kind of scenario but for events there may be one sender and multiple receivers.Here we create two project and each project contain one portlet.

So lets start this step by step:-
Continue Reading...

Wednesday, October 14, 2015

Inter Portlet Communication (IPC) using Public Render Parameter in Liferay


We already know that render Parameter set in processAction is available to render method of same portlet. But if we set render parameter in one portlet and want to get in another portlet . In this case we use Public Render Parameter so that parameter set in one portlet can be available to another Portlet.This feature is known as Inter Portlet Communication(IPC)  using Public Render Parameter.

We take a simple scenario where user can select food type from one portlet and second portlet shows food items on the basis of first portlet. This is a Sender, Receiver kind of scenario.Here we create two project and each project contain one portlet.

So lets start this step by step:-

Continue Reading...

Tuesday, October 13, 2015

Inter Portlet Communication (IPC) by Portlet Session in Liferay


Inter Portlet Communication can be done by many ways like by using events,public render parameters and Portlet Session. Today we discuss about IPC by using Portlet Sessions. Here we set some value in one portlet and get value in other Portlet.

We take a simple scenario where user can select food type from one portlet and second portlet shows food items on the basis of first portlet. This is a Sender, Receiver kind of scenario.Here we create two project and each project contain one portlet.

So lets start this step by step:-

Continue Reading...

Monday, October 12, 2015

Service Builder in Liferay


Service builder in Liferay provide a easy way to created services. We just need to provide the table structure in a xml file and all the CRUD methods generate automatically. For custom methods you may create Custom Sql  and Finder MethodsToday we create a basic services with just single table and see how to enter data in the table.

So lets start this step by step:-

Continue Reading...

Thursday, October 8, 2015

Portlet Configuration Page in Liferay using Custom Class


We already discuss about Portlet Configuration page using DefaultConfiguration class provide by liferay. In this blog we create the same application but by using our own custom class.Here we are created a simple table where user can configure number of columns at run time. ie Show/Hide columns at run time.

So lets start this step by step:-

Continue Reading...

Portlet Configuration Page in Liferay using DefaultConfigurationAction


Portlet Configuration page in Liferay is a very handy feature by which we can store portlet related configuration at run time. Configuration page in Liferay uses preferences to store the configuration. This can be achieved by two ways:-

1)By using DefaultConfigurationAction Class.
2)By using own class that extends DefaultConfigurationAction .

In this blog we will use the first approach.Here we are created a simple table where user can configure number of columns at run time. ie Show/Hide columns at run time.

So lets start this step by step:-

Continue Reading...

Thursday, October 1, 2015

Edit Mode in Liferay


We already know each portlet have three modes view, edit and help. In this blog we see Edit mode in detail before reading this blog you must know about Portlet Modes in Liferay.In this blog we use a simple form in edit mode where user can set his preferences that he is Vegetarian or non-vegetarian and on this basis we provide a menu of food items.

So lets start this step by step:-

Continue Reading...

Total Pageviews

Number Of Unique Visitor

Free counters!