Tuesday, August 19, 2014

Accessing ADF Iterator Binding from Value Change Listener

This is a quick hint about how to access ADF iterator binding from value change listener method. Let's say you have generic value change listener, reusable with any kind of input components and you want to get information about underlying ADF BC View Object structure in that listener. Value Change Listener provides access to UI Component, we should evaluate component expression and look up in the bindings for component binding name.

Here is the sample application - ADFIteratorAccessApp.zip. This applications comes with generic value change listener method implemented in the bean. I'm getting value property expression of input component and translating it into attribute name. With the attribute name, I can search in the binding container for attribute binding. From the attribute binding, is possible to retrieve mapped iterator object, iterator could provide information about ADF BC View Object structure:


It works pretty smooth, when generic value change listener is attached to the input component and user is changing value:


Iterator name is printed from generic value change listener, iterator object is retrieved dynamically through attribute definition mapping to iterator:

1 comment:

Anonymous said...

Great post actually..what if I want to do the same behavior against inputText which inside the RichTable?