28 December, 2011

Access image from liferay theme

If you want to access any images in liferay from theme,
you can follow below very simple steps:

1) Define the taglib in your portlet jsp file
<%@taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %>
2)Define the liferay tag like
<liferay-theme:defineObjects />

20 December, 2011

Theme variables

whenever you create any theme in liferay, you will have many variable which you can directly use in theme velocity file.

14 December, 2011

Embed search in theme

Hi everyone,

Simplest way to integration of search in theme.

If you want to integrate portal search and web content search in Liferay theme, Use below code in your vm file:

12 December, 2011

Embed web content in theme- Liferay6.X.X

Hello Liferay folks,

I know that many time you will have this requirement that you need to integrate web content into Liferay theme.
So here is the code which can help you to integration :

Alloy UI taglibs

Hi Everyone,
you can see below example to get the idea about Alloy UI taglibs

09 December, 2011

GroupId for global scope in LR 6.0.X

When you want to access data or artilcle from global scope in liferay 6.0.X ,
you can use below code to get group id :


Get community list in theme

If you want to fetch all the community list in theme after login,
you can use below code :

05 December, 2011

Liferay setup

 Hi Liferay Geeks,

As per the request by many developers who have just started to push up their shocks for liferay development, Here i am putting this step by step information for "How to setup liferay server in local machine & How to setup development environment".

Create sample portlet

Hello Everyone,

I have been asked by lot many people to show some steps how can we create samplet portlet in liferay.

So Here I have one good tutorial which can give very basic idea of creation of portlet in liferay using IDE.

11 November, 2011


Below code will helpful to create popup in liferay :
In Liferay 5 :
<portlet:renderURL var="somePageURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
 <portlet:param name="jspPage" value="/jsp/some/page.jsp"/>
 <portlet:param name="redirect" value="<%= currentURL %>"/>

AlloyUI form submition

Here is the code to submit the form using ajax call within popup.

Liferay 5 with jQuery

jQuery in liferay 6

Hi Everyone,
you will be aware that jquery plugin has been removed from LR 6 and alloyui has been integrated for gr8 UI.
So Still if you want to integrate jquery with liferay 6 then follow below steps :

21 October, 2011

Portlet URL using javascript

To create portlet URL using javascript,use below script :

function createRowURL( row ) {
   var portletURL = new Liferay.PortletURL();
   portletURL.setParameter("rowNumber", row );
   return portletURL.toString();

Struts portlet

Here are steps to create a struts portlet using Liferay plugins sdk:

1) Change portlet.xml which would have below content:


20 October, 2011

What's new in liferay 6.1 beta ?

  • Multiple Repository Mounting - including CMIS 1.0 Support
  • Unification of the Document Library and Image Gallery (Image gallery and document library combined into one called Documents and media)

17 October, 2011

Add FCKEditor

Use below sample code to integrate FCKEditor with liferay and replace with your value :

<liferay-ui:input-editor /><input
    name="directoryDescription" type="hidden" />

04 October, 2011

Minimize Liferay Portal Process Load

As we know that Liferay comes with a lot of functionality bundled that not everybody might need, this article explains how it can be minimized to gain memory, CPU cycles, etc.

Portlet Vs. Servlet

  •  With servlets, the service() method processes all requests.
  •  With portlets, the processAction() method processes the requests and the render() method draws the    contents of the portlet on the page.

Portlet Lifecycle

I know that this is very simple topics but might be most useful and necessary to understand :
Portlet Lifecycle

Default velocity variables for web content

This all Are the Default velocity variables :


29 September, 2011

amCharts Integration

Hello guys,

Many times we are having requirement to generate different types of charts in many of our web application.
So this is the very good tool which you can integrate with liferay and can get many types of charts using flash or javascript.

22 September, 2011

EXT deployment in LR-6

Here are the steps that need to be executed on the server for EXT deployment :
  • Redeploy Liferay. To do this, follow the same steps you used when first deploying Liferay on the app server. If you are using a bundle, you can just unzip the bundle again. If you've installed Liferay manually on an existing application server, you'll need to redeploy the .war file and copy the global libraries to the appropriate directory within the application server. If this is the first time the Ext plugin is deployed, you can skip this step.

Liferay URL parameters details

Hi Everyone,
you might be aware that whenever you perform any action in liferay , its genrating URL with some parameters. So its necessary to know the meaning or value of these parameters.
So here are the important URL details !!!!!

Alloy UI Elements

These are the tags that can be used in aui forms and some of their attributes. They all support dynamic attributes, which means that you can add any additional attribute and it will be used. For example, if you add the attribute onFocus to a aui:button, the <button> will have this onFocus attribute.



08 September, 2011

ckeditor customization

see below steps to add ckeditor in liferay !!!

Add below lines in jsp file

30 August, 2011

Dynamic Query

Hope this will be useful !!!!

DynamicQuery query = DynamicQueryFactoryUtil.forClass(User.class, PortalClassLoaderUtil.getClassLoader());
List<User> result = UserLocalServiceUtil.dynamicQuery(query);
for(User userList : result){

26 August, 2011

Theme Settings and New Advanced Controls

Guys !!!!
Do you know this ??????????

Liferay theme has new feature ....................
Please have look here

25 August, 2011

Access Objects from Velocity

Hello everyone,

This is really nice and useful for many requirements .
Please check below URL
Click Here

24 August, 2011

Power of HtmlUtil

Many time we know that we need to escape the URL title and need mechanisms in Liferay to escape characters.
So here is the brief of escaping :

SMTP Setup

This is very simple to connect with SMTP if you knows liferay but if you are using liferay first time then this would be useful :

Graphical User Interface 

In Liferay 6 and Liferay 5.2.x, you can configure the SMTP server by going to Control Panel -> Server Administration -> Mail.

16 August, 2011

User portrait Image

Hello Liferay Rockers,
if you want to use liferay user portrait in theme(I men in velocity template (or .vm file)) then you can use below 1 line of code and can get portrait image in theme.

<img src="/image/user_male_portrait?img_id=$user.portraitId&amp;" alt="Test Test" width="25">

10 August, 2011

Retrieve portleturl

Hello Guys,

Might be below 2 lines would help you to get portleturl object in liferay :

long plid = PortalUtil.getPlidFromPortletId(themeDisplay.getScopeGroupId(), portlet.getPortletId());
PortletURL viewURL = new PortletURLImpl(request, portlet.getPortletId(), plid , PortletRequest.RENDER_PHASE);

22 July, 2011

Mail API

Hello Java Folks,

We are using mail sending functionlaity in most of the web applications.
So have a look on below java class which can help you to send the mail using JAVA API.

14 July, 2011

Inter portlet communication (IPC)

Hello Everyone,
Here is the flow of IPC

Here below are the steps to follow for IPC :

12 July, 2011

Convert List to JsonArray

Might be you won't be aware that you can't use existing portal *JsonSerializer.java class in Liferay plugin portlets. So if you want to get JsonArray response of existing liferay service then you can use below code :

import net.sf.json.JSONArray;

List myList = UserLocalserviceUtil.getUsers();
JSONArray jsonArray = JSONArray.fromObject(MyList);

11 July, 2011

Kaleo Workflow

Hey guys have you ever been used liferay workflow ?
Do you know kaleo workflow engine which is come up with LR 6.0.X ?

08 July, 2011


WSRP : Most useful world if you are using portlet standards.

so you wanna get introduce with WSRP ???? Just follow me and my this link .

This article represents vary nice details of WSRP.

If it really helpful ? just say Thanks to me for finding this article for you :)

Cheers !!!!!!!!!!

Alloy-UI-Ajax call

Hello Liferay Rockers,

As you all know that Liferay 6.0.X is using AlloyUI framework for GUI.
So here is the code to make ajax call using AlloyUI.

you can write your response in test.html and can write your action on success of ajax call.

Work with WSRP (Web Services for Remote Portlets )

Hello Everyone ,

do you know anything about WSRP ?

If No please have a look once on Here .

It's very simplified and useful article to understand the WSRP and still if you have any confusion you can ask me here ant query.

01 July, 2011

jboss-tomcat clustering

Hello everyone,

Do you know how to make clustering within liferay server nodes ?

There is best article available here.

Read it and Enjoy!!!!

27 June, 2011

Social Application

Hi Liferay Folks,

Many times a thought comes up in our mind when we are choosing proper solution to develop social application,

How Liferay will suite for Social Application ???????

So stop thinking and choose liferay for your social application as its fulfill most of your requirement.
For more informations please see here.

15 June, 2011

Google Guru

Wanna know about google guru ???

Follow these below steps :

To start using Google Talk Guru:

14 June, 2011

JSON Service


Check Best use and example of json with liferay
Click Here
Its really helpful article.

10 June, 2011

Ajax call using jQuery

As we all know many web applications are using ajax.
And really its magic of AJAX !!!
Here is the code how can we make ajax call in liferay :

03 June, 2011

Manage Portal User State Programatically in doView

30 May, 2011

RSS feed in asset publisher

As we know we have RSS feed for message board,wiki,blogs in LR 5.2.X But don't have feed for asset publisher portlet.
I have implemented RSS feed for Asset publisher for LR 5.2.X .
If you want to know any further information regarding implementation just put a comment.

16 May, 2011

Find Blogs By Tag Name

Hi Everyone,

If you want to find blogs as per the tag name in Liferay 6 the code is here :
public List findBlogsByTagName(String[] tagNames){
long[] anyTagIds = AssetTagLocalServiceUtil.getTagIds(themeDisplay.getScopeGroupId(),tagNames);

02 May, 2011

Liferay With Vaadin

18 April, 2011

Facebook Like Box

Put the below code in your portlet to make working facebook like-box.
Also you can configure height,width and account-URL from liferay configuration.
See below screen shots :

<fb:like-box href="<%=faceBookURL!=null ? faceBookURL : PortletProps.get("default.url") %>" width="<%=width!=null ? width : PortletProps.get("default.width") %>" height="<%=height!=null ? height : PortletProps.get("default.height") %>" show_faces="true" stream="false" header="true"> </fb:like-box>

06 April, 2011

Twitter portlet in Liferay

I have create twitter widget in liferay for showing the timeline (tweets)
if you need more information put the comment.
Please see below image for twitter timeline update integration with liferay :

Get portlet preference

In many cases we need to find portlet preferences.
Below is the code which can help to find portlet preferences.

PortletPreferences preferences = renderRequest.getPreferences();
String portletResource = ParamUtil.getString(request, "portletResource");
if (Validator.isNotNull(portletResource)) {
preferences = PortletPreferencesFactoryUtil.getPortletSetup(request, portletResource);

23 March, 2011

LDAP Attribute integration

Follow these steps:

1.Make ready your LDAP server with your fields with proper schema.

22 March, 2011

Autocomplete Using jQuery

Hi All,

As we are having lot many requirments for autocomplete functionality.

Please see below lines of code for easy implementation of autocomplete using jquery.

create one web application

17 February, 2011

Portlet Preferences

There are two kinds of portlet preferences available.
  • Static Preferences
  • RunTime Preferences

order by clause in service.xml

The attributes of the order-column element allows you to fine tune the ordering
of the entity.

<order by="asc">
<order-column name="title" />

16 February, 2011

Article by tag name

As Now we are moving with liferay 6 we would have lot many requirements
to find the articles by tag name.So in liferay-6 i found little bit
change to find the articles according to tags in comparison with liferay 5.2.X.
So here below i have put the code snippet to find articles by tag for liferay 6.
Hope it will be usefull !!!

Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...