Skip to Content

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

Possible to have a binding (aggregation binding) on matrix layout?

I wanted to bind the

sap.ui.commons.layout.MatrixLayout

to my model such that it created the items inside it (each item being an HBOX that has its own content) that are bound to the model.

If the modle has 10 objects, I would like to create 10 hboxes.

The hbox has text fiels inside it and they will be bound to the properties that are there in the objects in the model.

Is this possible? or do I have to manually run a loop to create this?

Please help!

Former Member
Former Member replied

var oRowTemplate = new sap.ui.commons.layout.MatrixLayoutRow({

  cells: [

  new sap.ui.commons.layout.MatrixLayoutCell({

  content: new sap.ui.commons.Label({text:"propertyName:"})

  }),

  new sap.ui.commons.layout.MatrixLayoutCell({

  content: new sap.ui.commons.TextView({text:"{propertyValue}"})

  })

  ]

  });

  oMatrixLayout.bindAggregation("rows", "/properties", oRowTemplate);

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