on 08-20-2017 9:50 AM
Hi all,
i have a problem when i try to set a value for a TextField navigating from second page to third page (details).
In second page i set a variable "idLabelBp" (defined in third page), but in third page i'm not able to set the value selected (ex.0000002000) for label "Business Partner".
I see the value always empty, but in debugger i got it correctly.
Attached javascript code of second and third pages.
Is it possible to save the value selected in a local json model and get it in the third page?
oModelBpDetails = new sap.ui.model.json.JSONModel();
oModelBpDetails.setData(Line);
sap.ui.getCore().setModel(oModelBpDetails,"bpdetails");second-page.jpgthird-page.jpg
Could you help me please?
Thanks in advance.
Dario.
Hi Dario,
Below code will resolve your issue.
// In Second View
var data = {value: "12345"};
sap.ui.getCore().setModel(data,"bpdetails");
// In Third View
var data = sap.ui.getCore().getModel("bpdetails");
this.getView("yourTextFldId").setValue(data.value);
Regards,
Irfan G.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.