JSF1.2:ui:repeat、a4j:repeat 和 t:datalist 标签之间的区别
您知道主题中提到的标签有什么区别吗?
我认为它们应该产生几乎相同的结果,但事实证明,在某些情况下,ui:repeat
(facelets 标签)无法按您的预期工作,尽管它也被视为基本迭代组件。
t
代表 tomahawk
,a4j
是 richfaces
前缀。
欢迎任何评论。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Facelets 的
ui:repeat
在某些情况下确实存在错误。至于与其他两个的区别,归结为它不是UIData
组件,而其他两个是。Ajax4jsf
UIRepeat
扩展 <代码>UIData。Tomahawk 的
HtmlDataList扩展
UIData
。
Facelets 的
UIRepeat
确实不扩展UIData
。UIData
提供的可继承代码库相当成熟(尽管它并不总是像应有的那样高效)。 Facelets 的UIRepeat
仍需要进一步完善。ui:repeat
无法扩展UIData
,因为它是 Facelets(视图技术)的一部分,而不是 JSF(基于组件的 MVC 框架)的一部分。它最初也是由另一个团队开发的。由于尚不清楚您到底在谈论什么问题,因此很难判断它是否实际上是已知的错误之一,或者只是一种误解/滥用。至少,此处概述了与
ui:重复
。Facelets'
ui:repeat
has indeed bugs in certain situations. As to the difference with the other two, it boils down that it's not anUIData
component while the other two are.Ajax4jsf
UIRepeat
extendsUIData
.Tomahawk's
HtmlDataList
extendsUIData
.Facelets'
UIRepeat
does not extendUIData
.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. Theui:repeat
can't extendUIData
, 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
.