On Fri, Feb 14, 2014 at 4:46 AM, arjan tijms <arjan.tijms_at_gmail.com> wrote:
> Hi,
>
>
> On Friday, February 14, 2014, Kito Mann <kito.mann_at_virtua.com> wrote:
>
>> This is probably a stupid question, but can someone tell me how input
>> controls keep track or the proper values for the different life cycle
>> phrases when they're processed within a DataTable? Reading the code it's
>> clear how they are processed, but I don't quite understand where the
>> per-row values are handled since there is only one component that must
>> handle all rows.
>>
>>
> From the top of my head I remember that the state corresponding to such
> single component is swapped in and out for each iteration over the data
> bound to the DataTable. It's a bit like the flyweight pattern. All the
> different component values corresponding to all rows are kept in a big
> state array that's managed by the DataTable.
>
I realized it was the flyweight pattern, but I couldn't find the actual
code where the state was being restored. I guess I should have just read
through all of UIData instead of stepping through the code -- all of the
magic was happening in setRowIndex(), which calls the methods for saving
and restoring state (at least in MyFaces).
I'm basically just trying to figure out how to get the value of a component
inside of the DataTable inside of a method that's called after validation
has occurred. Looks like invokeOnComponent will do because it handles the
state management for the rows.
>
> Kind regards,
> Arjan Tijms
>
>
>
>>
>>
>> --
>> ___
>>
>> Kito D. Mann | @kito99 | Author, JSF in Action
>> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and
>> consulting
>> http://www.JSFCentral.com | @jsfcentral
>> +1 203-998-0403
>>
>> * Listen to the Enterprise Java Newscast: *http://w
>> <http://blogs.jsfcentral.com/JSFNewscast/>ww.enterprisejavanews.com
>> <http://ww.enterprisejavanews.com>*
>> * JSFCentral Interviews Podcast:
>> http://www.jsfcentral.com/resources/jsfcentralpodcasts/
>> * Sign up for the JSFCentral Newsletter:
>> http://oi.vresp.com/?fid=ac048d0e17
>>
>>