I am hoping for some 'best practice' guidance.
I am returning an array of objects from a REST service and would like to have those appear inside a grid. Each row (representing an object) has an Edit button. The user clicks on the Edit button if they wish to update the data. I would like to bind in the _id into the button as a custom attribute (data-object-id) so that when the user clicks the button the JS will read the attribute, set a local storage variable and then display the edit screen.
So what I did was bind in the _id into the button.text and then in the transformation JS I read the value and set the custom attribute (data-object-id). The problem is that now the button text has the _id displayed. I tried to override it using codeelement.find(".ui-btn-text").text("new text");/code but it seems that Appery sets the ID AFTER the transformation code executes thereby negating my code above.
Perhaps I am going about this all wrong? Any thoughts/guidance would be greatly appreciated.