Hi,

https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/head/OnEventHeaderItem.java?source=cc
doesn't
cut the 'on' prefix.
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/AjaxEventBehavior.java?source=cc#L68
-
does.

I'll update OnEventHeaderItem to do it too.

Explanation:
'onclick' should be used for inline attributes, e.g. <div onclick="..." ...>
'click' should be used for document.addEventListener/attachEvent


On Wed, Jul 31, 2013 at 10:17 PM, Cedric Gatay <[email protected]> wrote:

> If I remember well click or on click should work, the "on" prefix is
> automatically removed if it is present.
>
> Regards,
> Le 31 juil. 2013 20:47, "Gabriel Landon" <[email protected]> a écrit :
>
> > Martin in the javadoc there's an example saying "onclick". So should it
> be
> > "click"?
> >
> >         /**
> >          * Creates a {@link OnEventHeaderItem} for the given parameters.
> >          *
> >          * @param target
> >          *            The target of the event handler, for example
> > 'window' or
> > 'document'.
> >          * @param event
> >          *            The event itself, for example '*onclick*'.
> >          * @param javaScript
> >          *            The script to execute on the event.
> >          *
> >          * @return A newly created {@link OnEventHeaderItem}.
> >          */
> >         public static OnEventHeaderItem forScript(String target, String
> > event,
> > CharSequence javaScript)
> >         {
> >                 return new OnEventHeaderItem(target, event, javaScript);
> >         }
> >
> >
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/gmap2-wicket-6-9-and-ajax-refresh-tp4660564p4660586.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>

Reply via email to