DWRUtil.addOptions('coRegulateurList_tbody', TermList, {
creatorFunction: function(oneTerm)
{
var oneOption = new Option(oneTerm.terminalId+(oneTerm.terminalActive?" Active": ""), oneTerm.terminalId);
oneOption.id='term_'+oneTerm.terminalId;
oneOption.selected=oneTerm.terminalSelected;
}
});
But why the hell use DWRUtil, I'm doing all the work :op
Some maybe like this it would be smarter :
DWRUtil.addOptions(
'coRegulateurList_tbody', TermList, {
idFunction: function(oneTerm)
{
return 'term_' +oneTerm.terminalId;
},
selectedFunction:function(oneTerm)
{
return oneTerm.terminalSelected;
},
textFunction:function(oneTerm)
{
return oneTerm.terminalId+(oneTerm.terminalActive?" Active" :"");
}
});