You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Craig Lenzen <le...@visi.com> on 2007/09/09 03:32:28 UTC

AjaxFallbackOrderByBorder not doing ajax

I have to admit that I don't fully understand the ajaxfallback components,
but I just switched over to AjaxFallbackOrderByBorder and it still seems to
be making full requests instead of ajax requests.

I assume I'm doing something stupidly wrong here, any help would be greatly
appreciated.

By the way, I'm used 1.3 beta 3 if that matters.

Thanks
Craig 
-- 
View this message in context: http://www.nabble.com/AjaxFallbackOrderByBorder-not-doing-ajax-tf4407826.html#a12575202
Sent from the Wicket - User 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: AjaxFallbackOrderByBorder not doing ajax

Posted by Martijn Dashorst <ma...@gmail.com>.
On 9/9/07, Craig Lenzen <le...@visi.com> wrote:
>
> I have to admit that I don't fully understand the ajaxfallback components,


They work by splitting the javascript/Ajax calls from the normal
non-ajax requests by generating:

<a href="normal action url" onclick="ajax javascript script; return
false;">link</a>

If/when javascript is turned off in the browser, or it doesn't support
javascript, then the browser will not respond to the onclick event,
using the href directly. Wicket will then use a normal request target,
and call the serverside onclick with a null AjaxRequestTarget.

If javascript is enabled, wicket will send an ajax request, and
process it serverside with an AjaxRequestTarget, that is supplied to
the serverside onclick method. The "return false" in the <a href>
onclick handler ensures the browser doesn't perform the normal request
too.

The latter is nicely illustrated with this:

<a href="javascript:alert('href event handler');"
onclick="alert('onclick event handler');">clicking me gives two
alerts</a>

<a href="javascript:alert('href event handler');"
onclick="alert('onclick event handler');return false;">clicking me
gives only one alert</a>

Martijn

-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

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


Re: AjaxFallbackOrderByBorder not doing ajax

Posted by Craig Lenzen <le...@visi.com>.
Sorry, disregard this posting, as I thought, I was doing something completely
stupid, it helps to add the AjaxFallbackOrderByBorder component instead of
the OrderByBorder component.

-Craig


Craig Lenzen wrote:
> 
> I have to admit that I don't fully understand the ajaxfallback components,
> but I just switched over to AjaxFallbackOrderByBorder and it still seems
> to be making full requests instead of ajax requests.
> 
> I assume I'm doing something stupidly wrong here, any help would be
> greatly appreciated.
> 
> By the way, I'm used 1.3 beta 3 if that matters.
> 
> Thanks
> Craig 
> 

-- 
View this message in context: http://www.nabble.com/AjaxFallbackOrderByBorder-not-doing-ajax-tf4407826.html#a12575235
Sent from the Wicket - User 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