cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Control with multiple aggregation doesn't render anything

Former Member
0 Kudos

Hi all,

I am working on creating a custom control. The control accepts an aggregation called "documents" with cardinality 0..n.

var TagTab = Control.extend("sap.ui.demo.DocTab", { metadata: { library: "sap.m", properties: { expandable : {type : "boolean", group : "Misc", defaultValue : true}, expanded : {type : "boolean", group : "Misc", defaultValue : true} }, defaultAggregation: "documents", aggregations: { documents: {type: "sap.m.IconTabFilter", multiple: true, singularName: "item"} } } });

Now I am using this control in XML view like this:

<DocTab items="{/docs}">

<m:IconTabFilter text="{docName}" ></m:IconTabFilter>

</DocTab>

But nothing gets rendered on the screen. I tried checking the binding in render function of the control using : console.log(oControl.getDocuments()) but this returns null.

What else do we need to implement in order to get the multiple aggregation working ? Currently I don't have anything apart from control metadata and render fucntion.

Thanks

Shruti

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member365727
Active Contributor
0 Kudos

have you tested the UI control with hardcoded data?, if not then test that once...

Former Member
0 Kudos

Yes, it works fine with the hard-coded data. Its just when I introduce binding .. it stops working

I have checked the same binding with a stanadrd control and works fine there.

former_member365727
Active Contributor
0 Kudos

show UI control code..especially render.js