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

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!

Tips & Tricks

Posted on : 05-10-2008 | By : Jeff Robinson | In : General

Tags:

0

Coding Tip: If you’re using Liferay Open source portlets, the folder within the portal source named portal-impl contains both the class libraries and the source code to both the portal-based servlets as well as all the portlet code.

Articles

Posted on : 03-10-2008 | By : Jeff Robinson | In : General

Tags:

0

I’ve finally placed two short articles in the learning center:

  • Intro to Portlet Development
  • Moving from Servlet to Portlet Development

Check out the Learning Center in the future for more articles.

Page 1 of 512345»