on 09-30-2014 7:54 AM
Hi
I have many problems with binding!
I have InputField1 (type string) bindet to VAR1 (from Context -> Node -> Attribute)
I have TextView1 bindet to VAR1
When I write to InputField1 (bindet to VAR1) and press Enter TextView1 (bindet to VAR1) is not changed
When I have InputFiled2 (type D) bindet to VAR2 (from Context -> Node -> Attribute)
And TextView2 bindet to VAR2 (from Context -> Node -> Attribute)
When I select value through search help in InputFiled2 value in TextView2 is not changed!
Where is a problem?
Thank you
Problem is in the binding ONE attribute to more object.
When I have InputField1 (type string) bindet to VAR1
and TextView2 bindet to VAR2
and in InputField I have event "onEnter" and this method i read VAR1 and set to VAR2 everything is OK
Problem is only case when I have more objects (InputField1, TextView1, TextView2 etc.) bindet to ONE attribute!
But when I set this ONE attribute in WDDINIT (set VAR1 = 'text') in ALL objects (InputField1, TextView1, TextView2 etc.) bindet to VAR1 show same value = 'text'
Why is problem ONLY in binding more objexts to same ONE attribute?
When I bing more objects to more attribute everything is OK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Problem is only case when I have more objects (InputField1, TextView1, TextView2 etc.) bindet to ONE attribute!
It's not the case. You can bind the same attribute to Inp and Text UIs, but you need to press Enter after entering data in Input(with onEnter event created). Then the screen renders and you can see the value in both the UI elemnts.
Regards,
Kiran
Hi,
This is the standard functionality of the UI elements and it's binding concepts.
For eg, If you bind the same attribute(String = TEST) to all of your UI elements, then in the final output you will only get 'TEST' for all the UI elements.
Check for the below help doc on Data Binding.
https://help.sap.com/saphelp_nw04s/helpdata/en/af/434941db42f423e10000000a155106/content.htm
BR,
RAM.
Hi
But how code I must give to onEnter event?
I have context attribute var1 (type string) with initial value 'init'
I have 2 UI element InputFiel1 and TextView1 bindet to same context attribute var1.
When I start program, in both UI element i see 'init' - this OK
Then I insert value to UI InputField1 'test' and press Enter -> var1 = 'test', but I see only in InputField1 not in TextView1
in this moment i see
InputField1 -> 'test'
TextView1 -> 'init'
How code I must put to onEnter event?
read var1 and then set var1???
Thank
Hi,
Data from UI to Context Node or vice versa will be transferred upon the screen rendering. Create an onEnter event for your input filed( can be empty).
then when you press enter, your screen will render and the data will transfer from Input to context node and from Context to Text View and you can see the Text.
hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You should have an action created for INPUT FIELD1, field2.
So that on an action , the framework update the context and re-renders the view ( Refreshes the view the latest data ) . Hence your value of input field reflects in TEXT view.
Create an action attach to the input fields, it solves your issue.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Input Field and Text View behaviours are entirely different. Though you have binded both of them to a single attribute, you can't expect the change in your Text View on any action over your Input Field.
It can be done by dynamically on handling the onEnter event action of your Input Field.
Please explain your requirement, such that it makes easier to get with it.
BR,
RAM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.