what’s the method used to change a domain classes property within the gsp?
Ex:
a domain class project has a dueDate which is of type date.
I want to within the gsp, set its date without using the tag
The reason is, I’m using jquery’s datepicker which is nice since instead of having an ugly dropdown for mm/dd/yyyy it has a nice little calendar for one to click on.
Anywho, any ideas?
Thanks in advance 😀 😀 😀
Well, Grails uses a MVC pattern and therefore you should not directly change a domain class property within a GSP page.
Of course you can use the JQuery date picker but you should provide a controller action to update your domain class property
Now all you have to write is an Ajax call to this controller action and you successfully separated the presentation layer from the rest of your application.
And here is how your GSP could look like.