You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/03/06 08:00:51 UTC

[jira] [Commented] (TAP5-2462) Parent component should be able to reset a Grid regardless of its internal state

    [ https://issues.apache.org/jira/browse/TAP5-2462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14350044#comment-14350044 ] 

ASF subversion and git services commented on TAP5-2462:
-------------------------------------------------------

Commit 2bc3fab2284b3d5a22d5642a5038b3bfd872b93b in tapestry-5's branch refs/heads/master from kaosko
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=2bc3fab ]

FIXED - TAP5-2462: Parent component should be able to reset a Grid
regardless of its internal state
- do sortModel.clear() before setting the current page because the
formerl internally calls the private operation setupPaginationModel(),
otherwise you may get a null pointer



> Parent component should be able to reset a Grid regardless of its internal state
> --------------------------------------------------------------------------------
>
>                 Key: TAP5-2462
>                 URL: https://issues.apache.org/jira/browse/TAP5-2462
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Kalle Korhonen
>            Assignee: Kalle Korhonen
>
> Calling Grid.reset() from the parent component may result in NullPointerException:
> Caused by: java.lang.NullPointerException
> at org.apache.tapestry5.corelib.components.Grid.setCurrentPage(Grid.java:600)
> at org.apache.tapestry5.corelib.components.Grid.reset(Grid.java:636)
> at org.tynamo.examples.simple.pages.List.resetGrid(List.java:83)
> at org.tynamo.examples.simple.pages.List.setupRender(List.java)
> The issue is that setCurrentPage(1) on Grid.reset() is really unnecessary or at least should be after sortModel.clear(); (lines 636-637)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)