To pass temporary data from html to controller, we need to define transient property inside domain. But transient property in domain is not bindable by default, so to solve the problem , we can do :

In domain class

String t1
static transient =['t1']
static constraints = {
   t1 bindable:true
}

We also need to remember to add the t1 property into map inside CustomMarshallerRegistrar for translation between json and java object.

Advertisements