JSF2 和 Spring Webflow(在Facelet 标记内不响应)
我试图在数据表的每个单元格中都有一个命令链接列表。
这是一个小例子,解释了我想要做什么
<h:form id="form1">
<p:dataTable id="doctorTable" var="doctor"
value="#{search.medecinsResult}" rowIndexVar="rowIndex">
<p:column headerText="#{search.headerDate[1]}">
<ui:repeat var="seance" value="#{search.column2[rowIndex]}">
<h:commandLink value="#{seance}" action="Reserver"
title="Réservez cette séance">
</h:commandLink>
<br />
</ui:repeat>
</p:column>
</p:datable>
</h:form>
,我在 XML 流中的页面 viewState 上定义了转换:
<view-state id="result">
<transition on="Reserver" to="next">
</transition>
</view-state>
commandLink 在重复标记之外工作正常,但当它在里面时,只需重新加载网页,
我发现 JIRA 存在问题,但它没有解决。 JIRA 问题链接
(如果有)任何解决方法都会很棒,感谢您的回复。
i am trying to have a List of commandLink in every cell of dataTable.
this is small example explaining what i am trying to do
<h:form id="form1">
<p:dataTable id="doctorTable" var="doctor"
value="#{search.medecinsResult}" rowIndexVar="rowIndex">
<p:column headerText="#{search.headerDate[1]}">
<ui:repeat var="seance" value="#{search.column2[rowIndex]}">
<h:commandLink value="#{seance}" action="Reserver"
title="Réservez cette séance">
</h:commandLink>
<br />
</ui:repeat>
</p:column>
</p:datable>
</h:form>
And i define transition on the page viewState in my XML flow:
<view-state id="result">
<transition on="Reserver" to="next">
</transition>
</view-state>
the commandLink work fine outside repeat tag, but when its inside it just reload the webpage
i found JIRA issues for that, but it not resolved.
link to JIRA issue
if there is any workaround it will be great, thank's for your responses.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
罪魁祸首是
。当嵌套在另一个重复组件中时,它的工作效果不太好。已经有很多相关问题,JSF 人员正在正在努力。通常的解决方案是选择一个“完全值得”的 JSFUIData
组件,例如
。由于您已经在使用 PrimeFaces,我建议您尝试使用
。It's the
<ui:repeat>
which is the culprit. It doesn't work very well when nested in another repeating component. There are many related issues for that already, the JSF guys are working on that. The usual solution is to pick a "fullworthy" JSFUIData
component instead, such as<h:dataTable>
. Since you're already using PrimeFaces, I'd suggest to try<p:dataList>
instead.