Damar Thapa wrote:
Hi,
Sorry to bother you all again!
What is the command in action event method to get the dataTable's data
so as to manipulate it?
What you need to iterate over is the list returned by the method that
the "value" of the dataTable points to; you don't need the UIData
component directly.
Remember that at the start of processing of the postback, the
t:dataTable will evaluate its "value" attribute (ie call the getter) in
order to get the objects to assign updated data to.
If you're using session-scope beans, then you've still got that data
around (though session beans aren't generally a good idea).
Otherwise, I suggest using <t:saveState> to store that data into the
view and inject it back into your managed bean.
You could also "regenerate" a list that is identical to the one that was
used as the value of the dataTable (in the getter invoked by the
dataTable). Note however that the list returned really does need to be
*identical* to the one present during the previous render phase
otherwise data updates obviously get stuffed up. Selecting "current
data" from a database can't be used if the database might have been
updated. Using t:saveState avoids this issue.
Regards,
Simon