问题
Do you know what is the difference between the tags mentioned in the subject?
I thought they should produce pretty much the same result but it turned out that in some cases ui:repeat
(a facelets tag) is not working as you would expect, although it's also considered a basic iteration component.
t
is for tomahawk
and a4j
is a richfaces
prefix.
Any comment is welcome.
回答1:
Facelets' ui:repeat
has indeed bugs in certain situations. As to the difference with the other two, it boils down that it's not an UIData component while the other two are.
Ajax4jsf UIRepeat extends UIData.
Tomahawk's HtmlDataList extends UIData.
Facelets' UIRepeat does not extend UIData.
The inheritable codebase provided by UIData
is pretty mature (although it is not always as efficient as it ought to be). The Facelets' UIRepeat
still needs to be polished more. The ui:repeat
can't extend UIData
, because it's part of Facelets, the view technology, not of JSF, the component based MVC framework. It was also initially developed by a different team.
Since it's unclear what issue exactly you're talking about, it's hard to tell whether it's actually one of its known bugs or just a misinterpretation/abuse. At least, here is an overview of all known bugs related to ui:repeat
.
来源:https://stackoverflow.com/questions/5023164/jsf1-2-difference-between-uirepeat-a4jrepeat-and-tdatalist-tags