updates the specified collection with new options
collection | string | the name of the collection to update |
options | array | the new values of the collection |
boolean | true, if the update was successful; false, if the collection wasn't found |
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"items", height:23, type:"select",
options:scheduler.serverList("goods", goods_array), map_to:"section_id" },
{name:"time", height:72, type:"time", map_to:"auto"}
];
Let's assume that you have the lightbox as in:
scheduler.config.lightbox.sections=[
{name:"description", ...},
{name:"items", height:23, type:"select", options:scheduler.serverList("goods"),
map_to:"section_id" },
{name:"time", ...}
];
With such declaration it would be possible to update options in the select control through the list named 'goods'.
To update the 'goods' list you can use:
scheduler.updateCollection("goods", new_goods_array);
Let's assume that you have the Units view as in:
scheduler.createUnitsView({
name:"unit",
property:"section_id",
list:scheduler.serverList("units", sections),
size:20,
step:1
});
To update the list of displayed units you can use:
scheduler.updateCollection("units", new_sections_array);