You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2013/08/01 08:52:24 UTC

Re: gmap2, wicket 6.9 and ajax refresh

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 <ga...@gmail.com> 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" <gl...@piti.pf> 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: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: gmap2, wicket 6.9 and ajax refresh

Posted by Cedric Gatay <ga...@gmail.com>.
Looking at the code on my phone is not that easy, i had a wrong souvenir ;)

__
Cedric Gatay (@Cedric_Gatay <http://twitter.com/Cedric_Gatay>)
http://code-troopers.com | http://www.bloggure.info | http://cedric.gatay.fr


On Thu, Aug 1, 2013 at 9:04 AM, Martin Grigorov <mg...@apache.org>wrote:

> https://issues.apache.org/jira/browse/WICKET-5296
>
>
> On Thu, Aug 1, 2013 at 8:52 AM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
>
> > Hi,
> >
> >
> >
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/head/OnEventHeaderItem.java?source=ccdoesn'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 <ga...@gmail.com>
> 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" <gl...@piti.pf> 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: users-unsubscribe@wicket.apache.org
> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >
> >> >
> >>
> >
> >
>

Re: gmap2, wicket 6.9 and ajax refresh

Posted by Martin Grigorov <mg...@apache.org>.
https://issues.apache.org/jira/browse/WICKET-5296


On Thu, Aug 1, 2013 at 8:52 AM, Martin Grigorov <mg...@apache.org>wrote:

> 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 <ga...@gmail.com> 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" <gl...@piti.pf> 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: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
>
>

Re: gmap2, wicket 6.9 and ajax refresh

Posted by Gabriel Landon <gl...@piti.pf>.
Thank you for you help Martin.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/gmap2-wicket-6-9-and-ajax-refresh-tp4660564p4660630.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org