You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Andy Huhn (JIRA)" <de...@tapestry.apache.org> on 2007/11/10 18:09:50 UTC

[jira] Created: (TAPESTRY-1901) Grid component calls prepare() and getRowValue() with incorrect values

Grid component calls prepare() and getRowValue() with incorrect values
----------------------------------------------------------------------

                 Key: TAPESTRY-1901
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1901
             Project: Tapestry
          Issue Type: Bug
          Components: Core Components
    Affects Versions: 5.0.6
         Environment: Debian Lenny, Sun JDK 1.6, Jetty, Tapestry 5.0.6
            Reporter: Andy Huhn


I have a grid defined with rowsPerPage = 2.  When there are 3 elements in the GridDataSource, I display page 2.  (So that there is only one element displaying).  The user clicks an action link that has the following event handler defined:

    public ListAccount onActionFromDel( Integer prmRId )          {
        _DAO.delByRId(prmRId);
        return( _listAccount );
    }

(ListAccount is the current page class).

The Grid calls getAvailableRows() on the GridDataSource, and getAvailableRows() returns 2.

The Grid should automatically go to page 1 since there are only 2 rows available and rowsPerPage is set to 2.  However, instead, the Grid calls prepare() with firstResult = 2 and lastResult = 1.  After this, the Grid calls getRowValue() with a negative value.

Note that the problem goes away if I add a line to the event handler:
    public ListAccount onActionFromDel( Integer prmRId )          {
        _DAO.delByRId(prmRId);
        _listAccount._actList.setCurrentPage( 1 );       <------   this line solves the problem
        return( _listAccount );
    }

But I don't believe this should be necessary.

Thanks,
Andy

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAPESTRY-1901) Grid component calls prepare() and getRowValue() with incorrect values

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAPESTRY-1901:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> Grid component calls prepare() and getRowValue() with incorrect values
> ----------------------------------------------------------------------
>
>                 Key: TAPESTRY-1901
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1901
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 5.0.6
>         Environment: Debian Lenny, Sun JDK 1.6, Jetty, Tapestry 5.0.6
>            Reporter: Andy Huhn
>            Assignee: Howard M. Lewis Ship
>
> I have a grid defined with rowsPerPage = 2. When there are 3 elements in the GridDataSource, the user clicks the "2" link to display page 2. (So that there is only one element displaying). The user clicks an action link that has the following event handler defined: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         return( _listAccount ); 
>     } 
> (ListAccount is the current page class). 
> As the Grid attempts to re-render itself, it calls getAvailableRows() on the GridDataSource, and getAvailableRows() correctly returns 2. 
> The Grid should automatically go to page 1 since there are only 2 rows available and rowsPerPage is set to 2. However, instead, the Grid calls prepare() with firstResult = 2 and lastResult = 1. After this, the Grid calls getRowValue() with a negative value. 
> Note that the problem goes away if I add a line to the event handler: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         _listAccount._actList.setCurrentPage( 1 ); <------ this line solves the problem 
>         return( _listAccount ); 
>     } 
> But I don't believe this should be necessary. 
> Thanks, 
> Andy

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Closed: (TAPESTRY-1901) Grid component calls prepare() and getRowValue() with incorrect values after items are removed

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1901.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 5.0.10

> Grid component calls prepare() and getRowValue() with incorrect values after items are removed
> ----------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1901
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1901
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 5.0.6
>         Environment: Debian Lenny, Sun JDK 1.6, Jetty, Tapestry 5.0.6
>            Reporter: Andy Huhn
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.10
>
>
> I have a grid defined with rowsPerPage = 2. When there are 3 elements in the GridDataSource, the user clicks the "2" link to display page 2. (So that there is only one element displaying). The user clicks an action link that has the following event handler defined: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         return( _listAccount ); 
>     } 
> (ListAccount is the current page class). 
> As the Grid attempts to re-render itself, it calls getAvailableRows() on the GridDataSource, and getAvailableRows() correctly returns 2. 
> The Grid should automatically go to page 1 since there are only 2 rows available and rowsPerPage is set to 2. However, instead, the Grid calls prepare() with firstResult = 2 and lastResult = 1. After this, the Grid calls getRowValue() with a negative value. 
> Note that the problem goes away if I add a line to the event handler: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         _listAccount._actList.setCurrentPage( 1 ); <------ this line solves the problem 
>         return( _listAccount ); 
>     } 
> But I don't believe this should be necessary. 
> Thanks, 
> Andy

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1901) Grid component calls prepare() and getRowValue() with incorrect values after items are removed

Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship updated TAPESTRY-1901:
-------------------------------------------

    Summary: Grid component calls prepare() and getRowValue() with incorrect values after items are removed  (was: Grid component calls prepare() and getRowValue() with incorrect values)

> Grid component calls prepare() and getRowValue() with incorrect values after items are removed
> ----------------------------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1901
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1901
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 5.0.6
>         Environment: Debian Lenny, Sun JDK 1.6, Jetty, Tapestry 5.0.6
>            Reporter: Andy Huhn
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.10
>
>
> I have a grid defined with rowsPerPage = 2. When there are 3 elements in the GridDataSource, the user clicks the "2" link to display page 2. (So that there is only one element displaying). The user clicks an action link that has the following event handler defined: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         return( _listAccount ); 
>     } 
> (ListAccount is the current page class). 
> As the Grid attempts to re-render itself, it calls getAvailableRows() on the GridDataSource, and getAvailableRows() correctly returns 2. 
> The Grid should automatically go to page 1 since there are only 2 rows available and rowsPerPage is set to 2. However, instead, the Grid calls prepare() with firstResult = 2 and lastResult = 1. After this, the Grid calls getRowValue() with a negative value. 
> Note that the problem goes away if I add a line to the event handler: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         _listAccount._actList.setCurrentPage( 1 ); <------ this line solves the problem 
>         return( _listAccount ); 
>     } 
> But I don't believe this should be necessary. 
> Thanks, 
> Andy

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-1901) Grid component calls prepare() and getRowValue() with incorrect values

Posted by "Andy Huhn (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-1901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andy Huhn updated TAPESTRY-1901:
--------------------------------

    Description: 
I have a grid defined with rowsPerPage = 2. When there are 3 elements in the GridDataSource, the user clicks the "2" link to display page 2. (So that there is only one element displaying). The user clicks an action link that has the following event handler defined: 

    public ListAccount onActionFromDel( Integer prmRId ) { 
        _DAO.delByRId(prmRId); 
        return( _listAccount ); 
    } 

(ListAccount is the current page class). 

As the Grid attempts to re-render itself, it calls getAvailableRows() on the GridDataSource, and getAvailableRows() correctly returns 2. 

The Grid should automatically go to page 1 since there are only 2 rows available and rowsPerPage is set to 2. However, instead, the Grid calls prepare() with firstResult = 2 and lastResult = 1. After this, the Grid calls getRowValue() with a negative value. 

Note that the problem goes away if I add a line to the event handler: 
    public ListAccount onActionFromDel( Integer prmRId ) { 
        _DAO.delByRId(prmRId); 
        _listAccount._actList.setCurrentPage( 1 ); <------ this line solves the problem 
        return( _listAccount ); 
    } 

But I don't believe this should be necessary. 

Thanks, 
Andy

  was:
I have a grid defined with rowsPerPage = 2.  When there are 3 elements in the GridDataSource, I display page 2.  (So that there is only one element displaying).  The user clicks an action link that has the following event handler defined:

    public ListAccount onActionFromDel( Integer prmRId )          {
        _DAO.delByRId(prmRId);
        return( _listAccount );
    }

(ListAccount is the current page class).

The Grid calls getAvailableRows() on the GridDataSource, and getAvailableRows() returns 2.

The Grid should automatically go to page 1 since there are only 2 rows available and rowsPerPage is set to 2.  However, instead, the Grid calls prepare() with firstResult = 2 and lastResult = 1.  After this, the Grid calls getRowValue() with a negative value.

Note that the problem goes away if I add a line to the event handler:
    public ListAccount onActionFromDel( Integer prmRId )          {
        _DAO.delByRId(prmRId);
        _listAccount._actList.setCurrentPage( 1 );       <------   this line solves the problem
        return( _listAccount );
    }

But I don't believe this should be necessary.

Thanks,
Andy


> Grid component calls prepare() and getRowValue() with incorrect values
> ----------------------------------------------------------------------
>
>                 Key: TAPESTRY-1901
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1901
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core Components
>    Affects Versions: 5.0.6
>         Environment: Debian Lenny, Sun JDK 1.6, Jetty, Tapestry 5.0.6
>            Reporter: Andy Huhn
>
> I have a grid defined with rowsPerPage = 2. When there are 3 elements in the GridDataSource, the user clicks the "2" link to display page 2. (So that there is only one element displaying). The user clicks an action link that has the following event handler defined: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         return( _listAccount ); 
>     } 
> (ListAccount is the current page class). 
> As the Grid attempts to re-render itself, it calls getAvailableRows() on the GridDataSource, and getAvailableRows() correctly returns 2. 
> The Grid should automatically go to page 1 since there are only 2 rows available and rowsPerPage is set to 2. However, instead, the Grid calls prepare() with firstResult = 2 and lastResult = 1. After this, the Grid calls getRowValue() with a negative value. 
> Note that the problem goes away if I add a line to the event handler: 
>     public ListAccount onActionFromDel( Integer prmRId ) { 
>         _DAO.delByRId(prmRId); 
>         _listAccount._actList.setCurrentPage( 1 ); <------ this line solves the problem 
>         return( _listAccount ); 
>     } 
> But I don't believe this should be necessary. 
> Thanks, 
> Andy

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org