Skip to Content

Open Fragment from Table row on success callback of Odata Service call

Nov 10, 2017 at 09:37 AM


avatar image
Former Member


I have a sap.m.table with a Button binded to a fragment in all its rows. The button is the PR button as shown in the image below:

whenever we are changing the materialId in any item, there is an Odata Service call which populates the row data.
My requirement is that the PR fragment should open automatically during the success callback of the service call.

code for normally opening the PR fragment on click

if (! { = sap.ui.xmlfragment("purchaseReq", "com.view.fragment.PurchaseRequisitions", this);
var oButton = oEvent.getSource();;

This code works when you click on the fragment,
However, I am not able to get the button source for that specific table row item on success call back. So the fragment isnt opening.
Would appreciate if anyone can help me with this

Hope I was clear enough

table-image.png (16.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Jun Wu Nov 10, 2017 at 12:44 PM

in call back, "this" is not that "this",

10 |10000 characters needed characters left characters exceeded