You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Lars Ködderitzsch (JIRA)" <de...@myfaces.apache.org> on 2007/05/25 17:25:16 UTC

[jira] Created: (TOMAHAWK-1009) DataScoller - FastForward has borderline issues

DataScoller - FastForward has borderline issues
-----------------------------------------------

                 Key: TOMAHAWK-1009
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1009
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Data Scroller
            Reporter: Lars Ködderitzsch


                
In certain cases the Fast forward works incorrectly, resulting in an empty table.
For instance you have 100 rows, 10 per page, fastforward set to 10.
You start off on the first page, then fast forward.

Due to a little bug in the page calculation, you will end up on page 11, which is empty.

Proposed fix:
snip from HtmlDataScroller broadcast -- see the line commented with //fix here

else if (FACET_FAST_FORWARD.equals(facet))
                {
                    int fastStep = getFastStep();
                    if (fastStep <= 0)
                        fastStep = 1;
                    int next = uiData.getFirst() + uiData.getRows() * fastStep;
                    int rowcount = uiData.getRowCount();
                    if (next >= rowcount) //fix here >= instead of >
                        next = (rowcount - 1) - ((rowcount - 1) % uiData.getRows());
                    setFirst(uiData, next);
                }

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


[jira] Updated: (TOMAHAWK-1009) DataScoller - FastForward has borderline issues

Posted by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Cagatay Civici updated TOMAHAWK-1009:
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.1.6-SNAPSHOT
           Status: Resolved  (was: Patch Available)

> DataScoller - FastForward has borderline issues
> -----------------------------------------------
>
>                 Key: TOMAHAWK-1009
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1009
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.5
>            Reporter: Lars Ködderitzsch
>            Assignee: Cagatay Civici
>             Fix For: 1.1.6-SNAPSHOT
>
>         Attachments: TOMAHAWK-1009_proposed.patch
>
>
>                 
> In certain cases the Fast forward works incorrectly, resulting in an empty table.
> For instance you have 100 rows, 10 per page, fastforward set to 10.
> You start off on the first page, then fast forward.
> Due to a little bug in the page calculation, you will end up on page 11, which is empty.
> Proposed fix:
> snip from HtmlDataScroller broadcast -- see the line commented with //fix here
> else if (FACET_FAST_FORWARD.equals(facet))
>                 {
>                     int fastStep = getFastStep();
>                     if (fastStep <= 0)
>                         fastStep = 1;
>                     int next = uiData.getFirst() + uiData.getRows() * fastStep;
>                     int rowcount = uiData.getRowCount();
>                     if (next >= rowcount) //fix here >= instead of >
>                         next = (rowcount - 1) - ((rowcount - 1) % uiData.getRows());
>                     setFirst(uiData, next);
>                 }

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


[jira] Commented: (TOMAHAWK-1009) DataScoller - FastForward has borderline issues

Posted by "Lars Ködderitzsch (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503878 ] 

Lars Ködderitzsch commented on TOMAHAWK-1009:
---------------------------------------------

I just downloaded the latest nightly snapshot (1.1.6), and the change is not in there yet.

I see the Fix version is 1.1.7, does that mean the bugfix will not be in 1.1.6?

> DataScoller - FastForward has borderline issues
> -----------------------------------------------
>
>                 Key: TOMAHAWK-1009
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1009
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.5
>            Reporter: Lars Ködderitzsch
>            Assignee: Cagatay Civici
>             Fix For: 1.1.7-SNAPSHOT
>
>         Attachments: TOMAHAWK-1009_proposed.patch
>
>
>                 
> In certain cases the Fast forward works incorrectly, resulting in an empty table.
> For instance you have 100 rows, 10 per page, fastforward set to 10.
> You start off on the first page, then fast forward.
> Due to a little bug in the page calculation, you will end up on page 11, which is empty.
> Proposed fix:
> snip from HtmlDataScroller broadcast -- see the line commented with //fix here
> else if (FACET_FAST_FORWARD.equals(facet))
>                 {
>                     int fastStep = getFastStep();
>                     if (fastStep <= 0)
>                         fastStep = 1;
>                     int next = uiData.getFirst() + uiData.getRows() * fastStep;
>                     int rowcount = uiData.getRowCount();
>                     if (next >= rowcount) //fix here >= instead of >
>                         next = (rowcount - 1) - ((rowcount - 1) % uiData.getRows());
>                     setFirst(uiData, next);
>                 }

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


[jira] Commented: (TOMAHAWK-1009) DataScoller - FastForward has borderline issues

Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499118 ] 

Mike Kienenberger commented on TOMAHAWK-1009:
---------------------------------------------

Please submit this change in the form of a unified diff patch:

http://wiki.apache.org/myfaces/Contributing_Patches

> DataScoller - FastForward has borderline issues
> -----------------------------------------------
>
>                 Key: TOMAHAWK-1009
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1009
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.5
>            Reporter: Lars Ködderitzsch
>
>                 
> In certain cases the Fast forward works incorrectly, resulting in an empty table.
> For instance you have 100 rows, 10 per page, fastforward set to 10.
> You start off on the first page, then fast forward.
> Due to a little bug in the page calculation, you will end up on page 11, which is empty.
> Proposed fix:
> snip from HtmlDataScroller broadcast -- see the line commented with //fix here
> else if (FACET_FAST_FORWARD.equals(facet))
>                 {
>                     int fastStep = getFastStep();
>                     if (fastStep <= 0)
>                         fastStep = 1;
>                     int next = uiData.getFirst() + uiData.getRows() * fastStep;
>                     int rowcount = uiData.getRowCount();
>                     if (next >= rowcount) //fix here >= instead of >
>                         next = (rowcount - 1) - ((rowcount - 1) % uiData.getRows());
>                     setFirst(uiData, next);
>                 }

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


[jira] Updated: (TOMAHAWK-1009) DataScoller - FastForward has borderline issues

Posted by "Lars Ködderitzsch (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Ködderitzsch updated TOMAHAWK-1009:
----------------------------------------

    Status: Patch Available  (was: Open)

> DataScoller - FastForward has borderline issues
> -----------------------------------------------
>
>                 Key: TOMAHAWK-1009
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1009
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.5
>            Reporter: Lars Ködderitzsch
>
>                 
> In certain cases the Fast forward works incorrectly, resulting in an empty table.
> For instance you have 100 rows, 10 per page, fastforward set to 10.
> You start off on the first page, then fast forward.
> Due to a little bug in the page calculation, you will end up on page 11, which is empty.
> Proposed fix:
> snip from HtmlDataScroller broadcast -- see the line commented with //fix here
> else if (FACET_FAST_FORWARD.equals(facet))
>                 {
>                     int fastStep = getFastStep();
>                     if (fastStep <= 0)
>                         fastStep = 1;
>                     int next = uiData.getFirst() + uiData.getRows() * fastStep;
>                     int rowcount = uiData.getRowCount();
>                     if (next >= rowcount) //fix here >= instead of >
>                         next = (rowcount - 1) - ((rowcount - 1) % uiData.getRows());
>                     setFirst(uiData, next);
>                 }

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


[jira] Commented: (TOMAHAWK-1009) DataScoller - FastForward has borderline issues

Posted by "Cagatay Civici (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499204 ] 

Cagatay Civici commented on TOMAHAWK-1009:
------------------------------------------

Thanks for the patch, I've assigned the issue to myself, I'll take a look.

Not much time passed since 1.1.5 release and I guess it'll a couple of months for a new release.

> DataScoller - FastForward has borderline issues
> -----------------------------------------------
>
>                 Key: TOMAHAWK-1009
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1009
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.5
>            Reporter: Lars Ködderitzsch
>         Assigned To: Cagatay Civici
>         Attachments: TOMAHAWK-1009_proposed.patch
>
>
>                 
> In certain cases the Fast forward works incorrectly, resulting in an empty table.
> For instance you have 100 rows, 10 per page, fastforward set to 10.
> You start off on the first page, then fast forward.
> Due to a little bug in the page calculation, you will end up on page 11, which is empty.
> Proposed fix:
> snip from HtmlDataScroller broadcast -- see the line commented with //fix here
> else if (FACET_FAST_FORWARD.equals(facet))
>                 {
>                     int fastStep = getFastStep();
>                     if (fastStep <= 0)
>                         fastStep = 1;
>                     int next = uiData.getFirst() + uiData.getRows() * fastStep;
>                     int rowcount = uiData.getRowCount();
>                     if (next >= rowcount) //fix here >= instead of >
>                         next = (rowcount - 1) - ((rowcount - 1) % uiData.getRows());
>                     setFirst(uiData, next);
>                 }

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