CONFIGURATION:
JBoss-4.0.5.GA
Seam 1.1.0.GA
ICEfaces-1.5.1
MyFaces 1.1.4
SUMMARY:
It seems there is a bug using data pagination functionality of EntityQuery
component with IceFaces.
BUG EFFECTS:
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.
MORE DETAILS:
My starting point was ContactList example. Trying to find out the root of the
bug I simplified it to this:
search.xhtml
<h:form>
| <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>
search.page.xml
<page>
| <param name="firstResult" value="#{contacts.firstResult}"/>
| </page>
components.xml
<fwk:entity-query name="contacts" max-results="2"
entity-manager="#{entityManager}">
| <fwk:ejbql>from Contact</fwk:ejbql>
| </fwk:entity-query>
Contact.java
one and the same with the example
CONCLUSION:
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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user