In many situation I need to use the value of some UIComponent
during run-time in many places in the application. But the problem is I could not access the component's value outside itsValueChangeListener
. I tried to store this value in local temporary variable, I also tried to use the Binding
propriety but it did not work out.
This thread: Changes done in the ValueChangeListener is not reflecting else where
tells that I should proceed everything in the ValueChangeListener
but this is not useful in my case and it is really limiting my choices later.
So, Question is: How to access the component value outside ValueChangeListener ?
I am using Jdeveloper 11.1.2.3 with ADF technology
I use this method: I create an instance variable of the component type. I set its value within the ValueChangeListener from the original component. Then I am able to use it within that bean. But you should be careful to beans scope. Try it with a session bean scope. If it is fine, then you should reconsider your bean scopes ;)