Monday, 2 January 2012

Rendering Div Using Ajax

you have to use remoteFunction and call it on any event and call action on the controller and when at the end of the action you have to render one template .

In controller

def sendMail={
   //sending mail code
   render(template:'renderingDiv',model:[Name:"any Bean"])
In  _renderingDiv.gsp
 //use Bean for data (any GSP code)

This div automatically Rendered to The remoteFunction calling page and added to the id
specified By update attribute in remoteFunction

No comments:

Post a Comment