You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Dries Schulten (JIRA)" <ji...@apache.org> on 2013/10/01 13:07:24 UTC

[jira] [Commented] (WICKET-4862) AjaxPagingNavigationLink and AjaxPagingNavigationIncrementLink output inline onclick attributes in addition to Wicket.Ajax.ajax event registration

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

Dries Schulten commented on WICKET-4862:
----------------------------------------

Seeing the same issue using Wicket 6.10.0, we use 'em' tags for our paging. Wicket renders an onclick attribute on the 'em' tag because the AjaxPagingNavigationLink extends from Link which in onComponentTag renders a onclick if the tag is not a 'a' tag. Because the Ajax paging links use a AjaxPagingNavigationBehavior that renders a JavaScript click event the original click is not needed (only for non ajax fallback?). Our current workaround is to remove the generated onclick handler in the onComponentTag of AjaxPagingNavigtionLink but I think it stops ajax fallback from working (our whole application is ajax based so no issue for us).

{code:java}
protected void onComponentTag(ComponentTag tag) {
	super.onComponentTag(tag);
	tag.remove("onclick");
}
{code}

> AjaxPagingNavigationLink and AjaxPagingNavigationIncrementLink output inline onclick attributes in addition to Wicket.Ajax.ajax event registration
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4862
>                 URL: https://issues.apache.org/jira/browse/WICKET-4862
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.2.0
>         Environment: Not env specific
>            Reporter: Barrett Snyder
>              Labels: ajax, inline, javascript
>         Attachments: awqs.zip, WICKET-4862.patch
>
>
> The AjaxPagingNavigation links are outputting inline onclick attributes in addition to being registered via Wicket.Ajax.ajax calls when used with certain tags like span. These are Ajax components so therefore should no longer have inline onclick handlers.



--
This message was sent by Atlassian JIRA
(v6.1#6144)