Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Create new control issue

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.



], 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 .


Former Member


0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question