RangeChangeEvent fired after getRowCount after last page is accessed
--------------------------------------------------------------------

                 Key: TRINIDAD-1582
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1582
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions:  1.2.12-core
         Environment: JSF RI Mojarra (1.2_13), JBoss Seam 2.2.0.GA, Facelets 
1.1.14, Tomcat 6.0.20
            Reporter: Mathias Walter


If the last page of a tr:table was accessed, any further range operation fires 
the RangeChangeEvent after getRowCount was called and not before. Before the 
last page is touched the first time, the event is always fired before 
getRowCount, even on backward navigations.

Background: I used a JBoss Seam EntityQuery object in the session scope. Every 
time, range operations are issued, the EntityManager has to be accessed. 
Unfortunately, it is not opened any more except for the initial display. Thus 
it must be set on every range operation but before database access. For that, I 
implemented a RangeChangeListener which does this. But it is not called before 
the firs database operation (determine the number of records via getRowCount).

How to repeat:

1. set breakpoints at the RangeChangeListener and 
org.apache.myfaces.trinidad.component.UIXCollection.getRowCount
2. navigate to the last page
    - now the breakpoint at the RangeChangeListener is reached first
4. navigate to any other page
    - now the breakpoint at getRowCount is reached first

BTW: Seam is not required to repeat the test.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to