I'm trying to set a variable in a .gsp file with an object been passed to the view from the controller. 'item' is an object in this case with an attribute called 'sequence' So what I'm trying to do is set the var 'action' to the value of item.sequence and if item.sequence is null then set action value to the string "new".
<g:set var="action" value= "${item.sequence?item.sequence:'new'}"/>
Unfortunately, I'm getting the value of item.sequence and "new" together. Does anyone know how I can do this shorthand?