Last updated by admin 9 years ago
There are currently two JIRA requests for some kind of JSR-168 Portlet functionality in Grails. | GRAILS-1345 | JSR 168 portlet Plugin | | GRAILS-254 | Portlet Support |

After some quick "interneting" my initial approach would be in the form of a plugin which integrates Light Portal into an existing grails app.

Light Portal comes with a Spring MVC Porlet demo which I hope to be able to reproduce with with Grails.

This would allow grails to continue to produce WAR files which could be dropped into most application servers. Most other "Portal Containers" require custom config files making a generic portlet/portal feature impossible.

The Apache Bridges project was also suggested, however would not be of use if we integrate a portlet container.

As far as the actual portlets go - ideally I would want to create a portlet something like this (I don't fully understand the conversion flow of a portlet so please excuse the simplicity of the example):

class HelloPortlet {

def message

def view = { if(message == null) message = "Hello from my portlet" render(message) }

def edit = { message = params.message }

def help = { render("This is a hello world type portlet - enter a message and it will echo it back to you.") } }

It would also want to support some kind of view convention so that your actions can return a model. Perhaps grails-app/views/<portlet_name>/_<actionName> so the edit action for the example above would be found at grails-app/views/hello/_edit.gsp

Hopefully a portlet can simply be an extension of the existing controller mechanism and the *Portlet.groovy files would be looked for in the controllers directory.