on 11-04-2015 9:24 AM
Greetings all
After creating a custom control:
sap.ui.Control.extend("CustomControl")
{
aggregations:
{
"tokens":{ type:"sap.m.Token", multiple:true, visibility: "public"}
},
init: function()
{
var control = this;
control.tokenContainer = new sap.m.Tokenizer(
{
tokens: control.getAggregation("tokens");
});
},
renderer:
{
render:function(oRm,oControl)
{
oRm.renderControl(oControl.tokenContainer);
}
}
}
I would like to use bindAggregation as follows:
var customControl = new CustomControl();
var tokenTemplate = new sap.m.Token({text:"Test"});
customControl.bindAggregation("tokens", "somePath", tokenTemplate);
The bindAggregation call works fine in that it goes in and fetches the data and such. The problem is that the control doesn't render the tokens when binding is done. There should be some event that triggers when data is loaded and then rerenders the tokenContainer.
It is preferred that this should happen inside the custom control. Rerender functions called outside it is not referred.
Thanks in advance for the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.