redefines a single configuration property (or a hash of properties)
property | string | the property name or a hash of properties that need redefining |
value | any | the new property value |
//redefines the datafeed url
$$('mylist').define("url", "new_data.xml");
$$('mylist').refresh();
//changes the label of the button
$$('button1').define("label", "New value");
$$('button1').refresh();
//change multiple properties at once
$$('text2').define({
value:"123",
label:"New label"
});
$$('text2').refresh();
The component should be refreshed to make the changes come into force.
You can use the config property to get the desired configuration option:
var width = $$("myList").config.width;
config is especially useful when a property is presented by an object:
var fieldWidth = $$('myGrid').config.fields['field_1'].width;
Note, in this case after $$("component_id").config you should write the complete dependency property inheritance chain.
Back to top