[jboss-user] [JBoss Seam] - EntityQuery is not compatible with IceFaces

andrewstoev do-not-reply at jboss.com
Wed Jan 17 07:39:41 EST 2007

Seam 1.1.0.GA
MyFaces 1.1.4

It seems there is a bug using data pagination functionality of EntityQuery component with IceFaces.

1) The page parameter firstResult doesn't bind correctly to the EntityQuery component. Like a result when the next button has been pressed, is shown only the first data page. But firstResult appears in the address with its correct value>0. 

2) The methods like previousExists and nextExists don't work correctly before rendering phase of s:link component. Therefore all buttons are visible. But they are supposed to be not, because they are set through attribute "rendered".

3) No errors in the log of server.

4) Everything works perfectly if I remove IceFaces from the project.


My starting point was ContactList example. Trying to find out the root of the bug I simplified it to this:

  |   <h:dataTable value="#{contacts.resultList}" var="contact">
  |     <h:column>
  |       <f:facet name="header">column</f:facet>
  |       <h:outputText value="#{contact.firstName} #{contact.lastName}" />
  |     </h:column>
  |   </h:dataTable>
  |   <!-- pagination control -->
  |   <s:link rendered="#{contacts.previousExists}" value="< previous Page">
  |     <f:param name="firstResult" value="#{contacts.previousFirstResult}"/>
  |   </s:link>
  |   <s:link rendered="#{contacts.nextExists}" value="next Page >">
  |     <f:param name="firstResult" value="#{contacts.nextFirstResult}"/>
  |   </s:link>  
  | </h:form>

  |    <param name="firstResult" value="#{contacts.firstResult}"/>
  | </page>

<fwk:entity-query name="contacts" max-results="2"                      entity-manager="#{entityManager}">
  |   <fwk:ejbql>from Contact</fwk:ejbql>
  | </fwk:entity-query>

one and the same with the example

I found out that data pagination via EntityQuery is the best solution at the moment for SEAM based projects, because it avoids the "end of memory" problem for big DB > 1 mln entity records. From the other hand IceFaces is great JSF framework and we are not likely to exclude it from our project. We really will do appreciate if mr. Gavin King and the authors of ICEfaces could cooperate to fix that bug. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4002735#4002735

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4002735

More information about the jboss-user mailing list