cannot use Service by using Portlet-Plugin

View: New views
1 Messages — Rating Filter:   Alert me  

cannot use Service by using Portlet-Plugin

by tran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I just use Portlet-Plugin to create some portlets with Grails. This Plugin create a new Artifact named portlets in grails-app. So a HelloPortlet.groovy in this artifact is created with command "grails create-portlet Hello". Now I try to use Service in this file like below.

class HelloPortlet {
def helloService

def renderView = {
helloService.runHello()
}
}  

But I always become error: cannot invoke method runHello on a nullobject.

Can someone help me?