Posts

Showing posts from May, 2012

jQgrid reload with new data

To reload a jQGrid with fresh data you need to set the data parameter on the grid and invoke reload on it. jQuery("#promotionsGrid").setGridParam({ 'data': newData}).trigger("reloadGrid"); Here newData is a JavaScript array with which I need to re-load the grid. The important thing here is that I had to place this statement just before the grid initialization code even though the reload was expected on change event of a text box. Without that there was simply no effect on my grid!

jQGrid and Date

jQgrid fails to sort or search Date columns correctly if you don't set proper format on the Date field. I finally corrected my problem by setting Date format before converting the object into JSON. SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); String formattedDate = formatter.format(date); object.setDate(formattedDate); Properties set in the grid was as below:

Properties to disable User private pages.

After a bit of struggle I found that to disable private pages of users in Liferay these properties can be applied in the portal-ext.properties file: layout.user.private.layouts.enabled=false layout.user.private.layouts.modifiable=false layout.user.private.layouts.auto.create=false layout.user.public.layouts.enabled=false layout.user.public.layouts.modifiable=false layout.user.public.layouts.auto.create=false