UIData needs review on a couple of fronts
[JAVASERVERFACES_SPEC_PUBLIC-963] Alignment/extending of iterating ui components Created: 01/Apr/11 Updated: 01/Aug/14
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
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 ]|
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 ]|
I thought we had an issue for this, but yes, it's a good idea.
|Comment by arjan tijms [ 27/Mar/14 ]|
I think is a very important issue. In general UIData seems to be more robust than UIRepeat, but they indeed do pretty much the same thing and when inspecting the code it also looks like they had similar implementations at one time and/or borrowed from each other.
If there was a common implementation bugs such as
It would also prevent issues like
|Comment by Ed Burns [ 01/Aug/14 ]|
Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.
|Comment by Manfred Riem [ 01/Aug/14 ]|
Setting priority to Major