Hi all,

I tried extending the AjaxPagingNavigator class to provide some feedback
while loading the next page using IndicatingAjaxLink. The
(not-compiling) code I wrote is below. I couldn't make it work because
the protected methods in AjaxPagingNavigator return a Link, as AjaxLink
is a sibling of Link instead of a subclass.

Why doesn't the AjaxPagingNavigator use an AjaxLink in the first place?

Suggestions welcome.


/* this doesn't work because IndicatingAjaxLink is not a subclass of Link
     class IndicatingAjaxPagingNavigator extends AjaxPagingNavigator {

        public IndicatingAjaxPagingNavigator(String id, IPageable pageable) {
            super(id, pageable);
        }
        
        @Override
        protected Link newPagingNavigationLink(String id, IPageable pageable, 
int pageNumber) {
            final Link result = super.newPagingNavigationIncrementLink(id, 
pageable, pageNumber);
            
            return new IndicatingAjaxLink(id) {

                @Override
                public void onClick(AjaxRequestTarget target) {
                    result.onClick();
                }
            };
        }
    } 
*/

regards,

-- 
Reinout van Schouwen



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to