0

I’m working on an application and I have to migrate it from Glassfish v2 to Glassfish v3. The application is based on IceFaces framework. To do that, we also swaped to Icefaces 3.3.0 while we were on Icefaces 1.8.2

It was working before the migration, but now when I generate a datatable, if I refresh the page (by clicking on a button from the application) without:

  • Either generating the datatable again (by using the calling request)
  • Or suppressing it with this java code : resultatBinding.getChildren().clear();

To sum-up, the component datatable works correctly at the first use, but if I modify another JSF component in the page without changing the datatable, I have a stack trace starting by:

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

[…]

This is how the declaration of the datatable is in the .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>

This is not understandable because despite the migration I didn’t change the corpus of the code and it was working before. As suggested by the Icefaces’ documention I swaped the annotation @RequestScoped to @ViewScoped. But with the both I still have my id trouble. I feel it’s a regression but I don’t know how to fix it. Is it possible I forgot to set one parameter?

Does someone have any idea?

Thanks in advance

Staro
  • 1
  • In JSF, it is a best practice to always assign an ID to your `UIInput`, `UICommand` and `UIContainer` components e.g. ``, ``, ``, etc. Do similar for your IceFaces components. – Luiggi Mendoza Dec 17 '14 at 15:17

1 Answers1

0

We had the same problem migrating from 1.8.2 to 3.3
The issue seems to rise then you use the binding to link you component to a backend implementation.
I really have no solution sorry.
After a lot of investigations we had to re-implement it another way.