views:

71

answers:

1

Hi,

How to get portlet preferences in grails for liferay .??

I used :
import javax.portlet.*

def renderEdit = {
PortletPreferences pref = RenderRequest.getPreferences()
println pref
['mykey':'myvalue']
}

but getting issue :
No signature of method: static javax.portlet.RenderRequest.getPreferences() is applicable for argument types: () values: []

thanks, sri...

A: 

You're trying RenderRequest.getPreferences(). There is no such method for class RenderRequest. Try calling the instance:

renderRequest.getPreferences(); // notice the small first letter r in 'render..'
heikkim
thanks heikkim , I used PortletPreferences pref = portletRequest.getPreferences() and this worked good .
srinath