|<< Back to previous view|
UIData needs review on a couple of fronts
[JAVASERVERFACES_SPEC_PUBLIC-963] Alignment/extending of iterating ui components Created: 01/Apr/11 Updated: 08/Nov/13
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Participants:||Ed Burns and Mathias Werlitz|
UIRepeat and UIData do pretty much the same: iterate over a collection of items. There should be a common base class for this, encapsulating the complicated logic for saving/restoring and iterating the state of the "rows". Something like "UIIterate".
Writing iterating components is very complicated at the moment. This base class should be easy to extend and also support any kind of data structures, not only "lists". Using an integer for the "row" iterating index is insufficient for creating "tree" components. A string or kind of indexing object would be much more flexible.
UIRepeat and UIData could extend this class and provide the existing interface on top of it.
|Comment by Mathias Werlitz [ 21/Apr/11 11:12 AM ]|
Well the essential difference between UIData(<h:dataTable>) and UIRepeat is how the iteration is done during render response.
I could imagine a structure like this:
At least there should be an marking interface for such components because state saving seems to be different when nesting of iterating components is possible. For example UIRepeat already checks for UIData or UIRepeat parents. UIData does only look for itself as a parent.
|Comment by Ed Burns [ 22/Apr/11 07:55 AM ]|
I thought we had an issue for this, but yes, it's a good idea.