27 March, 2012

Passing Parameters on liferay page link

Hi,

we have to create a jsp hook by modifying render_portlet.jsp.

Below is the sample code to set in dynamic request,
/**  Fix added to pass http request parameters to the portlet only for parameter names that start with '_eventId' --- begin  **/
if(renderRequestImpl.getHttpServletRequest() instanceof com.liferay.portal.servlet.NamespaceServletRequest){
        com.liferay.portal.servlet.NamespaceServletRequest namedDynamicRequest =
                (com.liferay.portal.servlet.NamespaceServletRequest)renderRequestImpl.getHttpServletRequest();

        java.util.Enumeration elements = originalRequest.getParameterNames();

        if(elements != null){
                while(elements.hasMoreElements()){
                        String element = (String) elements.nextElement();
                        if(element.startsWith("_eventId")){
                                namedDynamicRequest.setParameter(element, originalRequest.getParameter(element));
                        }
                }
        }
}
 **  Fix added to pass http request parameters to the portlet only for parameter names that start with '_eventId' --- end  **/

19 March, 2012

Custom Query

If you are thinking to use custom query feature of liferay in your plugin portlet,
Just follow below steps :

06 March, 2012

Liferay password decryption

Hello Liferay Rockers,

As we all know that liferay is using many algorithm for password encryption like md5 and other more.
So all passwords will be stored in encrypted format in database.
If you are finding any solution for password decryption from Liferay database,
then don't waste your time to find that solution.
Because there are no any API available in liferay which can give you decrypted password.