I have a method which calls private method. This method returns model. Once it is returned, I change some object values and render it. On jsp when I print value of 'message' then I do not get that value. Here is the code
def model = myMeth();
model.objkey.message = 'check message'
render(view: "index", model: model)
private method
private def myMeth() {
.....
[objkey: objvalue]
}
& gsp
<div class="message">${objkey?.message}</div>
But if I add value to message in private method before return then it's value is printed on gsp.
This is the private method which prints value in gsp
private def myMeth() {
.....
objvalue.message = 'check message'
[objkey: objvalue]
}
This used to work well in grails 1.3.7 but why does this happen in grails 2.2.4
This works as expected in 2.2.4 with the below setup hitting
indexaction. Is this the way you have yours set up?