cancel
Showing results for 
Search instead for 
Did you mean: 

Transfering string value from xml-view into variable in controller

GabrielGomezPad
Participant
0 Kudos

Hello experts,

At the moment of pressing the second TabFilter, the input value present in the first tabfilter ("Value_1") should be saved in controller´s variable "Glob_P".


After reading the correct answer from Florian Hafner  in this post, I tried to implement that code in controller:


"var oView = this.getView();

Glob_P = oView.byId('TV_1').getValue();"

but it did not worked (I believe I am still missing to give the correct reference of the view). I have also tried with the proposal from Nagarajan Kumarappan in his blog. Still I am not obtaining the result. Here are my two attempts:

JS Bin - Collaborative JavaScript Debugging

What am I missing? please help. I thank you for your support,

Gabriel

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Gabriel,

this.getView().byId("TV_1") should work fine. JSBin Edited, please check: JS Bin - Collaborative JavaScript Debugging

Regards,

Sai Vellanki.

GabrielGomezPad
Participant
0 Kudos

Thank you very much Sai. I should´ve been made some mistake somewhere during my attempts.

In case a text value should be retrieved, then is also possible. Based on your solution I implemented it (in case somebody needs in the future)

JS Bin - Collaborative JavaScript Debugging

Kind Regards,

Gabriel

Answers (0)