Monday, July 31, 2017

Config values from DB

DATABASE
qry = """insert into NJITVRS_CONFIG (CONFIG_KEY, CONFIG_UPDATED_BY, CONFIG_VALUE) VALUES (?, '${usr}', ?)""".toString()

sql.executeInsert(qry, ['ht_comments', '[NR:"Not Recieved", L : "Lost", S : "Stolen", TC: "Type Change", REF: "Refund", DNP : "Do Not Process", DEL: "Deleted", RES:"Resigned", RET: "Returned Permit"]'])


CONTROLLER
htComments      : Eval.me(Config.findWhere(key: "ht_comments").value)



FRONT END GSP

<g:select from="${htComments}" noSelection="${['': 'Select']}" optionKey="key"          optionValue="value" class="form-control" name="htComments" id="htComments"          ng-model="htComments"></g:select>

No comments:

Post a Comment