Portlet Session Attributes

Need to pass data between portlet instances?  Its inelegant and not the best way, but you can try setting session attributes.  To set portlet attrbutes, do the following:

request.setAttributes(String name, Object value);

Just be sure to uniquely name the attributes so only the intended portlets can inspect them. And don’t forget to reset these attributes after you’ve used them to avoid invalid attribute values.

 

Posted in General by Jeff Robinson. Comments Off

Portlet Modes

In your portlet.xml descriptor, you’re only required to indicate the View mode.  Accordingl to the Portlet Development guide, the other modes, EDIT and HELP, are optional.

 

Tags:
Posted in General by Jeff Robinson. Comments Off

Hooks

At times I’ve needed to modify a non-portlet aspect of Liferay. Previously, the only way to do this was through the extension environment.  Now, Liferay has introduced the concept of  Hooks.   Go check out the link to get more information about this useful feature.

Posted in General by Jeff Robinson. Comments Off