Sooo...getAjaxCallDecorator() is in AjaxPagingNavigationBehavior, which is
constructed in AjaxPagingNavigationLink, which is constructed in
AjaxPagingNavigator.newPagingNavigatorLink(), which my subclass overrides.
Is there a way to add this decorator without having to pass an object up the
Is this not possible for you:
protected Link newPagingNavigationLink(String id, IPageable pageable,
int pageNumber)
{
return new AjaxPagingNavigationLink(id, pageable, pageNumber) {
@Override
protected
I misspoke a earlier, the method I need to override is
newPagingNavigationIncrementLink(). Looks like this:
public AjaxPagingNavigationIncrementLink(final String id, final
IPageable
pageable, final int increment)
{
super(id, pageable, increment);
Yeah, I see what you mean. The AjaxPagingNavigationIncrementLink is
not really an AjaxLink, but has had an AjaxBehavior grafted in. I
think your best bet would be to build a PagingNavigationIncrementLink
and add a behavior similar to AjaxPagingNavigationBehavior to it, but
with the scriptaculous
Well, that works...I think this would be made easier if there were a
getAjaxBehavior() method in AjaxPagingNavigationIncrementLink. As it stands,
there are a few methods in my class that were copied/pasted directly from
AjaxPagingNavigationLink:
public class
Scratch that, the solution below causes a page refresh...
getAjaxCallDecorator() returns new CancelEventIfNoAjaxDecorator() it works
fine, but if it returns the defined decorator, the page refreshes after the
ajax call is complete. Why would that be? Should decorator extend
From what I can tell, since it is not really an ajax link but rather a
regular link with an ajax behavior, the ajax behavior needs to prevent
the onclick from bubbling to the anchors clickhandler. Your
ajaxcalldecorator will need to do that as well. It would be great if
once you are done you could
Fixed this last bit by wrapping the return call decorator in a CancelEvent
one (it chains):
final AjaxPagingNavigationBehavior behavior =
new AjaxPagingNavigationBehavior(this, pageable, onclick) {
protected IAjaxCallDecorator getAjaxCallDecorator() {
return new
I doubt I've enhanced anything. This is a rather roundabout solution at
best...You mean edit the Wicket source and post it somewhere?
James McLaughlin-3 wrote:
From what I can tell, since it is not really an ajax link but rather a
regular link with an ajax behavior, the ajax behavior needs
Well, it should be much easier to get the AjaxBehavior that is making
the PagingNavigatorLink act like an ajax link, so you can decorate the
onclick in the manner you suggested. You can create a jira issue here
http://issues.apache.org/jira/browse/WICKET
Describe your problem, what would make an
I'm looking to add an additional script to the onclick of a (paging) ajax
link. I stumbled on this thread:
http://www.nabble.com/Appending-to-AJAX-Submit-Button-onclick-tf1695285.html#a4600751
I can't seem to find the additional code in 1.3. The thread is a year old,
perhaps the code was
11 matches
Mail list logo