Hello, I am using Grails in an application that allows the inline editing of data in a data grid. There are certain key fields that may be defined and should not be editable. Here is some example code from the tag lib that I am using
case "dropdown":
out << "<select id='"+prefix + id+"' name='" + fieldData.code + "'>"
out << "<option value=''/>"
def vals = fieldData.value.split(",")
vals.each() {
out << "<option "+ (value == it ? "selected" : "") +" value='" + it + "'>" + it + "</option>"
}
out << "</select>"
break
Basically I need to add a class to the form element so that when it renders I can disable it using jQuery. Do I need an if statement for each form control or is there another way to accomplish this with Grails?