JSF,复制组件ID,同时从IceFaces 1.8迁移到3.3
我正在开发一个应用程序,我必须将它从Glassfish v2迁移到Glassfish v3。该应用程序基于IceFaces框架。为了做到这一点,我们在Icefaces 1.8.2上的时候也换到了Icefaces 3.3.0 它在迁移之前工作,但现在当我生成datatable时,如果我刷新页面(通过单击应用程序中的按钮),而没有:JSF,复制组件ID,同时从IceFaces 1.8迁移到3.3,jsf,datatable,icefaces,Jsf,Datatable,Icefaces,我正在开发一个应用程序,我必须将它从Glassfish v2迁移到Glassfish v3。该应用程序基于IceFaces框架。为了做到这一点,我们在Icefaces 1.8.2上的时候也换到了Icefaces 3.3.0 它在迁移之前工作,但现在当我生成datatable时,如果我刷新页面(通过单击应用程序中的按钮),而没有: 再次生成数据表(通过使用调用请求) 或者使用以下java代码抑制它:resultatBinding.getChildren().clear() 总而言之,组件dat
- 再次生成数据表(通过使用调用请求)
- 或者使用以下java代码抑制它:resultatBinding.getChildren().clear()李>
2014-12-16T10:27:26.449+0100|Grave: JSF1007 Duplicate component ID form : composite:j_ id123 found in view.
2014-12-16T10:27:26.449+0100|Grave: +id: j_id123
[…]
+id: j_id122
type: com.icesoft.faces.component.ext.UIColumn@76a457d5
+id: j_id123
type: com.icesoft.faces.component.ext.HtmlOutputText@1f829dcd
+id: j_id123
type: com.icesoft.faces.component.ext.HtmlOutputText@38460de4
+id: j_id124
type: com.icesoft.faces.component.ext.UIColumn@7f3a1098
+id: j_id125
type: com.icesoft.faces.component.ext.HtmlOutputText@3d17ac69
+id: j_id125
[…]
这是datatable在.xhtml中的声明方式:
<ice:panelGroup styleClass="iceFrm" style="overflow: auto;width: 802px;max-width: 802px; height: 440px; max-height: 440px;" rendered="#{requeteurSql.baseDeDonnees != null}">
<ice:dataTable id="tableau" rendered="#{not empty requeteurSql.resultat}" value="#{requeteurSql.resultat}" var="currentRow" rows="#{requeteurSql.nbLigneResultat}" binding="#{requeteurSql.resultatBinding}">
<f:facet name="header">
<ice:columnGroup>
<ice:headerRow binding="#{requeteurSql.headerBinding}">
</ice:headerRow>
</ice:columnGroup>
</f:facet>
</ice:dataTable>
</ice:panelGroup>
这是不可理解的,因为尽管进行了迁移,我并没有改变代码的主体,它以前也在工作。正如Icefaces的文档所建议的那样,我将注释@RequestScoped转换为@ViewScoped。但有了这两个,我的身份证还是有问题。
我觉得这是一个倒退,但我不知道如何修复它。我可能忘记设置一个参数了吗
有人知道吗
提前感谢我们在从1.8.2迁移到3.3时遇到了同样的问题
当您使用
绑定将组件链接到后端实现时,问题似乎会出现。
我真的没有办法,对不起。
经过大量的研究,我们不得不以另一种方式重新实现它。在JSF中,最好的做法是始终为UIInput
、UICommand
和UIContainer
组件(例如
、
、
等)分配一个ID。对IceFaces组件执行类似的操作。