You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Jaeckle (JIRA)" <ji...@apache.org> on 2007/12/07 15:00:43 UTC

[jira] Created: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
-------------------------------------------------------------------------------------

                 Key: WICKET-1210
                 URL: https://issues.apache.org/jira/browse/WICKET-1210
             Project: Wicket
          Issue Type: Wish
          Components: wicket
    Affects Versions: 1.3.0-rc1
            Reporter: Thomas Jaeckle
            Priority: Minor


I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html

Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.

It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Issue Comment Edited: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550350 ] 

maentele edited comment on WICKET-1210 at 12/11/07 4:14 AM:
------------------------------------------------------------------

I did 
((DataTable)pageable).detach();
as you suggested, but that doesn't clear the cached page count of the DataGridView in DataTable

I just noticed that overriding PagingNavigationIncrementLink.getPageNumber() would not help me, because the cachedItemCount in AbstractPageableView has still the old value. But I also don't see how I update or clear the cache ...

      was (Author: maentele):
    I did 
((DataTable)pageable).detach();
as you suggested, but that doesn't clear the cached page count of the DataGridView in DataTable
  
> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Issue Comment Edited: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550350 ] 

maentele edited comment on WICKET-1210 at 12/11/07 4:18 AM:
------------------------------------------------------------------

I did 
((DataTable)pageable).detach();
as you suggested, but that doesn't clear the cached page count of the DataGridView in DataTable

I just noticed that overriding PagingNavigationIncrementLink.getPageNumber() would not help me, because the cachedItemCount in AbstractPageableView has still the old value. But I also don't see how I update or clear the cache ...

someone reported the same problem on the mailing-list: 
http://www.nabble.com/DataView-clearCachedItemCount-to13875535.html

      was (Author: maentele):
    I did 
((DataTable)pageable).detach();
as you suggested, but that doesn't clear the cached page count of the DataGridView in DataTable

I just noticed that overriding PagingNavigationIncrementLink.getPageNumber() would not help me, because the cachedItemCount in AbstractPageableView has still the old value. But I also don't see how I update or clear the cache ...
  
> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Resolved: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1210.
-----------------------------------

       Resolution: Invalid
    Fix Version/s: 1.3.0-rc3
         Assignee: Igor Vaynberg

can you not simply override the link's onclick() and do 

onclick () {

  table.detach(); <== will clear the cached page count
  super.onclick();
}

if this doesnt work please reopen the issue, just seems like a funny place to have to override to get this functonality....

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Resolved: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1210.
-----------------------------------

    Resolution: Invalid

ok, how about this:

datatable.visitchildren(new component.ivisitor() { visitcomponent(component c) { c.detach(); return continue_traversal; }});

reopen if it doesnt work

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Commented: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551242 ] 

Thomas Jaeckle commented on WICKET-1210:
----------------------------------------

As I said before: I noticed myself that this is the wrong place to remove final, because AbstractPageableView.setCurrentPage(int page) throws a IndexOutOfBoundsException because it uses the cachedItemCount which I don't become cleared.
I'll try to provide a quickstart ..

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Commented: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552117 ] 

Igor Vaynberg commented on WICKET-1210:
---------------------------------------

looks like abstractpageableview wasnt clearing the item count cache in its ondetach(). fixed. upgrade from trunk and try again, your quickstart works over here after the change.

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>         Attachments: quickstart.zip
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Updated: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Jaeckle updated WICKET-1210:
-----------------------------------

    Attachment: quickstart.zip

Ok, here the quickstart:

Just click on the ">" Link in the topToolbar: another Page is loaded then, but not changed to

The Class "DataReloadingNavigationIncrementLink" would be the most interesting

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>         Attachments: quickstart.zip
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Resolved: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1210.
-----------------------------------

    Resolution: Invalid

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>         Attachments: quickstart.zip
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Closed: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Jaeckle closed WICKET-1210.
----------------------------------


it works, thanks

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>         Attachments: quickstart.zip
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Reopened: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Jaeckle reopened WICKET-1210:
------------------------------------


Even with the IVisitor it is still not working - the cache doesn't get cleared

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Commented: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551202 ] 

Igor Vaynberg commented on WICKET-1210:
---------------------------------------

to me this simply feels like the wrong place to remove final for this kind of code. could you please provide a quickstart that demonstrates the problem. thanks.

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Reopened: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Thomas Jaeckle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Jaeckle reopened WICKET-1210:
------------------------------------


I did 
((DataTable)pageable).detach();
as you suggested, but that doesn't clear the cached page count of the DataGridView in DataTable

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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


[jira] Updated: (WICKET-1210) Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()

Posted by "Frank Bille Jensen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen updated WICKET-1210:
---------------------------------------

    Fix Version/s:     (was: 1.3.0-rc3)

> Proposal to remove 'final' modifier for PagingNavigationIncrementLink.getPageNumber()
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-1210
>                 URL: https://issues.apache.org/jira/browse/WICKET-1210
>             Project: Wicket
>          Issue Type: Wish
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Thomas Jaeckle
>            Assignee: Igor Vaynberg
>            Priority: Minor
>         Attachments: quickstart.zip
>
>
> I wish to add a special behaviour to "PagingNavigationIncrementLink.getPageNumber()", which is final:
> http://www.nabble.com/PagingNavigationIncrementLink-special-behaviour-tf4935583.html
> Short: I extended "PagingNavigationIncrementLink.onClick()" so that more data is loaded from a service. After that I still want that the Page is changed, so I call "pageable.setCurrentPage(getPageNumber());".
> The "return Math.max(0, Math.min(pageable.getPageCount() - 1, idx));" breaks my neck because "pageable.getPageCount()" is missing the new added Page.
> It would be very helpful if PagingNavigationIncrementLink.getPageNumber() would not be final.

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