Hi All,
I’m writing to you with a problem that’s annoying me since I found it and I cannot come up with a solution. So I was wondering, if someone can actually see the where the problem is hidden.
I'm somehow not able to bind the model to a factory function. Here you can find a very simple example of my problem.
This one works, but isn't what I'm actually looking for, since the aggregation should depend on the model:
var oDialog = new sap.m.Dialog({
title: '{i18n>sap.im.ui.datasource.browse.title}',
content: [
new sap.m.Text({
text: 'content'
})
],
buttons: [
new sap.m.Button({
text: 'test1'
}),
new sap.m.Button({
text: 'test2'
})
]
});
oDialog.open();
This one never calls the factory (there's no aggregation at all):
var oDialog = new sap.m.Dialog({
title: '{i18n>sap.im.ui.datasource.browse.title}',
content: [
new sap.m.Text({
text: 'content'
})
],
buttons: {
path: '/myPath',
factory: function (){
return [
new sap.m.Button({
text: 'test1'
}),
new sap.m.Button({
text: 'test2'
})
]
}
}
});
oDialog.open();
And this one doesn't work either:
var oDialog = new sap.m.Dialog({
title: '{i18n>sap.im.ui.datasource.browse.title}',
content: [
new sap.m.Text({
text: 'content'
})
]
});
oDialog.bindAggregation('buttons', '/myPath', function(){console.log('res')});
oDialog.open();
Does anyone of you have an idea what's going on here?