views:

307

answers:

0

How do i render a view in a portlet. Have an action that handles a form submit from a portlet view window.

def actionView = {
    //TODO Define action phase

      println "IN THE ACTION !!!!"

      String name =  portletRequest.getParameter("name")

      if(name){
          println "RESNDERING RESULT"
          render(view:'result',model:['key':'key'])

      }else{
        return  [:]
      }
  }

the form submit and the result.gsp should display if name is not empty.

My expectation is that when i call the render method. The view called 'result' which is a gsp sitting in the same directory as view.gsp

/demo/view.gsp /demo/result.gsp

will be rendered.

However that does not work and a view.gsp is simply shown again.

Any ideas of the way to do this ?