Changing The Bindings Of A Table By Clicking On A Button
Solution 1:
If you want to unbind a property and bind it to another data attribute, you can use the unbindProperty
and bindProperty
methods. To learn more about how to use these methods, you can have a look at this page about property binding.
In your case, it will lead to quite some complexity and code because your field is embedded in a table, and you'll have to find the table row you need to change first.
You may want to consider expression binding though. From your example, it seems that you only want to show the old id
when the newTransactionId
is not present. If that's the case, your expression binding could look like this:
{= ${newTransactionId} ? ${newTransactionId} : ${id} }
To learn more about expression binding, you could have a look at Step 22 of the SAPUI5 walkthrough, which describes expression binding very well.
Post a Comment for "Changing The Bindings Of A Table By Clicking On A Button"