on 11-03-2015 2:41 PM
Hi All,
I try to create new UI5 control which is composite control and I need to use the DropdownBox as aggregation
This is my code.
sap.ui.define([
"sap/ui/core/Control",
"sap/ui/core/DropdownBox",
], function (Control, DropdownBox) {
Control.extend("newControl", {
metadata: {
aggregations: {
dropdownBox: {
type: "sap.ui.commons.DropdownBox",
mutiple: true,
visibility: "hidden"
},
....
Now I want to use the following
this.setAggregation("dropdownBox", new DropdownBox({
enabled: false,
busy: true,
layoutData: new sap.ui.layout.GridData({
span: "L7 M8 S12"
})
}));
In this line of the setAggregation I got error when I run my app
Uncaught Error: Aggregation '_dropdownBox' of Element newControl#__section2 used with wrong cardinality (declared as 0..n)
What am I missing here ?
I've tried also with multiple false and I got the same error please assist .
Miley
not setAggregation but addAggregation it is mutiple: true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
oRm.renderControl(oControl.getAggregation("dropdownBox")[0]);
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.