Featured Posts

Introducing Portlet Generator 1.0 I've just added the portlet generator utility to this site.  This utility replaces the "create.bat" and "create.sh" scripts that come with Liferay's PluginSDK.  It offers...

Readmore

Hello Struts Portlet I've placed a very simple Hello Struts portlet in the downloads section. It doesn't do nearly enough to show the power of Struts in Liferay. Look for a future Struts portlets...

Readmore

Hello jQuery Portlet I was recently asked: "What is jQuery?". By now, most Javascript enthusiasts understand the advantages of jQuery's power. To demonstrate one of those advantages, I've added...

Readmore

Hello Spring Portlet I've placed a simple, Hello World type Spring portlet in the downloads section. Check it out. It uses the Spring ParameterizableViewController to forward to the view JSP.

Readmore

Using jQuery with Liferay, Part 2 Four more core effects are Show, Toggle, Fade In, and Animate.   This week's portlet and the screencast below gives a demonstration of these four effects in a Liferay Portlet....

Readmore

RobiSoft.com Rss

Building SDK Portlets

Posted on : 28-11-2008 | By : Jeff Robinson | In : General

2

When using the Liferay Plugin SDK to build portlets, I’ve discovered that:

  1. Your portlet lib folder should contain only jars that are NOT in the Liferay portal ROOT lib folder.
  2. If your portlet needs access to jars already in Liferay, edit the WEB-INFliferay-plugin-package.properties file and add those jars to the portal-dependency.jars area.

During the build, those jars are temporarily copied to the porlet lib area and deleted afterwards.  During deployment, those jars are copied from Liferay’s lib folder to the deployed portlet lib folder.

Problem:  if you’ve already copied the jars yourself, Liferay won’t do the copy.  This could lead to version headaches and all kinds of strange Exception errors within Liferay.

Accessing Current URL

Posted on : 25-11-2008 | By : Jeff Robinson | In : General

Tags:

0

Although JSR 168 specifies that portlets do NOT have access to the client request of the portal (JSR 168, p. 16),  Liferay developers will find that they do have access to this URL.  If using the extension environment, take a peek at the JSP source in:

[liferay]portal\portal-web\docroot\html\portlet\init.jsp

Once there, youl’ll find the following code:

String currentURL = PortalUtil.getCurrentURL(request);

This means that each portlet JSP has immediate access to the original URL without any special tokens or encoding.  And since this file is included in the downstream JSP, you only need to access “currentURL” within your JSP to have access. You never know when this might come in handy!

Updated Site

Posted on : 24-11-2008 | By : Jeff Robinson | In : Annoucements

0

The Robisoft site has been updated and features blogging and search capabilities.

Next up: a new portlet featuring Spring Wizard controller for some of the Liferay Enterprise Admin functions.