Iterates all attributes of a JSON control definition and adds them in the correct attribute to the element. Some attributes are attributes of the element, others are added to the class or style attribute.
The target location can be influenced by another member of the factory called templateOptions.
$.udb.ui.registerControl("MenuControl", null, {
…
templateOptions: {
data: {
attributes: {
menuOrientation: function(value, options) {
return (value ? {attr: "class", value: value} : undefined);
}
}
}
},
…
};
|