on 07-13-2023 9:04 AM
Hi, I am doing a read operation and then trying to set the text of sap.m.Text control dynamically from Controller file. The read operation is triggered by the press of a Read button.
I am able to retrieve the data(from northwind service) but no luck setting the Text properly.
This is the Text control and Read Button.
this is controller code in a file.
Do I need to use another method for this?
Thank you.
this is not defined in the success handler. you need to save it in a global var:
var that = this;
....
success:
....
that.getView().byId("t1").setText(textData);
....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.