Using the cintelUtil, I can pretty easily set the Text for most SPEAK controls, on data binding. But for an Expander, I can't seem to set it. The setText has no effect.
It should be noted that my Expander is in a DataRepeater item. So it is going to dynamically render as many as needed for the data. Right now I am setting the text in the Expander rendering, but I need it to be dynamic because of the DataRepeater.
Below is the function for binding the data to the template. The Expander's name is InfoExpander.
setupCompanyInfo: function (intelBaseUrl) {
providerHelper.initProvider(this.CompanyInfoProvider,
"companyinfo",
intelBaseUrl,
this.ExternalDataTabMessageBar);
providerHelper.setupDataRepeater(this.CompanyInfoProvider, this.CompanyInfoRepeater);
this.CompanyInfoRepeater.on("subAppLoaded", function (args) {
var data = args.data,
subapp = args.app;
cintelUtil.setText(subapp.InfoName, data.Name, true);
cintelUtil.setText(subapp.InfoExpander, data.Name, true);
}, this);
providerHelper.getListData(this.CompanyInfoProvider);
}
Through lots of debugging and a better understanding of Backbone, I found my answer.
setupCompanyInfo: function (intelBaseUrl) {
providerHelper.initProvider(this.CompanyInfoProvider,
"companyinfo",
intelBaseUrl,
this.ExternalDataTabMessageBar);
providerHelper.setupDataRepeater(this.CompanyInfoProvider, this.CompanyInfoRepeater);
this.CompanyInfoRepeater.on("subAppLoaded", function (args) {
var data = args.data,
subapp = args.app;
cintelUtil.setText(subapp.InfoName, data.Name, true);
subapp.InfoExpander.set("header", data.Name);
}, this);
providerHelper.getListData(this.CompanyInfoProvider);
}