30 August, 2011

Dynamic Query

Hope this will be useful !!!!


DynamicQuery query = DynamicQueryFactoryUtil.forClass(User.class, PortalClassLoaderUtil.getClassLoader());
query.addOrder(OrderFactoryUtil.desc("userId"));
List<User> result = UserLocalServiceUtil.dynamicQuery(query);
for(User userList : result){
           System.out.println("....................."+userList.getFirstName());
}



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);

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...