sapui5 - Assign InPlaceEdit dynamically to TextFields created by RowRepeater -



sapui5 - Assign InPlaceEdit dynamically to TextFields created by RowRepeater -

how assign inplaceedit command textfields ware created dynamically via databinding rowrepeater?

basically have this:

somerowrepeater.bindrows("/path/to/an/array", new sap.ui.commons.textfield({value: "{value}"});

the array looks this:

[{text: "some first value"}, {text: "some sec value"}, ... ]

i tried add together id each textfield, add together inplaceedits using .byid() in onafterrendering method, modifying array [{text: "some first value", id: 0}, ...] , constructor of textfield ...textfield({text: "{value}", id: "{value}" + "{id}"}); i'm getting error message "{value}{id}" not valid id.

any suggestions?

here's working example:

<html> <head> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv='content-type' content='text/html;charset=utf-8'/> <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data-sap-ui-libs="sap.ui.commons,sap.ui.layout,sap.ui.ux3,sap.ui.table,sap.m" data-sap-ui-theme="sap_goldreflection"> </script> <script> var info = {rows: [{text: "some first value"}, {text: "some sec value"}]}; var omodel = new sap.ui.model.json.jsonmodel(data); var otable = new sap.ui.table.table({ title: "table column , info binding", shownodata : true, columnheaderheight : 10, }); otable.setmodel(omodel); otable.addcolumn(new sap.ui.table.column({ label: "my column", template: new sap.ui.commons.inplaceedit("ipe1",{ content: new sap.ui.commons.textfield({value: "{text}"}) }), })); otable.bindrows("/rows"); otable.placeat("content"); </script> </head> <body class="sapuibody" role="application"> <div id="content"></div> </body> </html>

hope helps.

regards.

sapui5

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -