Hi!
I am currently trying to use JQuery Mobile (Alpha) with Seaside 3.0. The problem is that this lib catches all anchor clicks and performs ajax calls to get a new page, which is a fully render xhmtl page.
The WAActionCallback doesn't currently allow such ajax callbacks. They are blocked with this method: isEnabledFor: aRequestContext " ^true"
^aRequestContext request isXmlHttpRequest not What would be a good solution to enable such callbacks also for AJAX calls.
Cheers Gerhard
_______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
You have to patch the request header 'X-Requested-With' as this is for
example done in the Ajaxifier library. Lukas On 26 October 2010 23:30, Gerhard Obermann <[hidden email]> wrote: > Hi! > I am currently trying to use JQuery Mobile (Alpha) with Seaside 3.0. > The problem is that this lib catches all anchor clicks and > performs ajax calls to get a new page, which is a fully render xhmtl page. > The WAActionCallback doesn't currently allow such ajax callbacks. > They are blocked with this method: > isEnabledFor: aRequestContext > " ^true" > ^aRequestContext request isXmlHttpRequest not > What would be a good solution to enable such callbacks also for AJAX calls. > > Cheers > Gerhard > _______________________________________________ > seaside-dev mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev > > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Yes but do i have to patch the library!
On Tue, Oct 26, 2010 at 11:38 PM, Lukas Renggli <[hidden email]> wrote: You have to patch the request header 'X-Requested-With' as this is for _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Or could this not be a preference?
On Tue, Oct 26, 2010 at 11:45 PM, Gerhard Obermann <[hidden email]> wrote: Yes but do i have to patch the library! _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
No, there is no need to patch anything, you just configure how jQuery
should do its requests. For example in my jQuery Mobile support code I have the following snippet: $(function () { $("html").ajaxSend(function(event, xhr) { xhr.setRequestHeader("X-Requested-With", "jQueryMobile"); }); }); Something like that is necessary for both the Ajaxifier and the jQuery Mobile library, because (most of the time) they do full requests through the AJAX infrastructure. A preference doesn't cut it, because sometimes you still want to do traditional AJAX request. Lukas On 26 October 2010 23:48, Gerhard Obermann <[hidden email]> wrote: > Or could this not be a preference? > > On Tue, Oct 26, 2010 at 11:45 PM, Gerhard Obermann <[hidden email]> wrote: >> >> Yes but do i have to patch the library! >> >> On Tue, Oct 26, 2010 at 11:38 PM, Lukas Renggli <[hidden email]> wrote: >>> >>> You have to patch the request header 'X-Requested-With' as this is for >>> example done in the Ajaxifier library. >>> >>> Lukas >>> >>> On 26 October 2010 23:30, Gerhard Obermann <[hidden email]> wrote: >>> > Hi! >>> > I am currently trying to use JQuery Mobile (Alpha) with Seaside 3.0. >>> > The problem is that this lib catches all anchor clicks and >>> > performs ajax calls to get a new page, which is a fully render xhmtl >>> > page. >>> > The WAActionCallback doesn't currently allow such ajax callbacks. >>> > They are blocked with this method: >>> > isEnabledFor: aRequestContext >>> > " ^true" >>> > ^aRequestContext request isXmlHttpRequest not >>> > What would be a good solution to enable such callbacks also for AJAX >>> > calls. >>> > >>> > Cheers >>> > Gerhard >>> > _______________________________________________ >>> > seaside-dev mailing list >>> > [hidden email] >>> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev >>> > >>> > >>> >>> >>> >>> -- >>> Lukas Renggli >>> www.lukas-renggli.ch >>> _______________________________________________ >>> seaside-dev mailing list >>> [hidden email] >>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev >> > > > _______________________________________________ > seaside-dev mailing list > [hidden email] > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev > > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
In reply to this post by Lukas Renggli
Thanks Lukas, Its working now.
I am still not sure if this is a good solution. Cheers Gerhard
On Tue, Oct 26, 2010 at 11:38 PM, Lukas Renggli <[hidden email]> wrote: You have to patch the request header 'X-Requested-With' as this is for _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
In reply to this post by Lukas Renggli
Does that mean that there is already a JQuery Mobile support for Seaside?
Gerhard
On Wed, Oct 27, 2010 at 12:06 AM, Lukas Renggli <[hidden email]> wrote: No, there is no need to patch anything, you just configure how jQuery _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Yes, not really complete though. That's why I didn't publish yet.
Lukas On Wednesday, October 27, 2010, Gerhard Obermann <[hidden email]> wrote: > Does that mean that there is already a JQuery Mobile support for Seaside? > Gerhard > > On Wed, Oct 27, 2010 at 12:06 AM, Lukas Renggli <[hidden email]> wrote: > No, there is no need to patch anything, you just configure how jQuery > should do its requests. For example in my jQuery Mobile support code I > have the following snippet: > > $(function () { > $("html").ajaxSend(function(event, xhr) { > xhr.setRequestHeader("X-Requested-With", "jQueryMobile"); > }); > }); > > Something like that is necessary for both the Ajaxifier and the jQuery > Mobile library, because (most of the time) they do full requests > through the AJAX infrastructure. A preference doesn't cut it, because > sometimes you still want to do traditional AJAX request. > > Lukas > > On 26 October 2010 23:48, Gerhard Obermann <[hidden email]> wrote: >> Or could this not be a preference? >> >> On Tue, Oct 26, 2010 at 11:45 PM, Gerhard Obermann <[hidden email]> wrote: >>> >>> Yes but do i have to patch the library! >>> >>> On Tue, Oct 26, 2010 at 11:38 PM, Lukas Renggli <[hidden email]> wrote: >>>> >>>> You have to patch the request header 'X-Requested-With' as this is for >>>> example done in the Ajaxifier library. >>>> >>>> Lukas >>>> >>>> On 26 October 2010 23:30, Gerhard Obermann <[hidden email]> wrote: >>>> > Hi! >>>> > I am currently trying to use JQuery Mobile (Alpha) with Seaside 3.0. >>>> > The problem is that this lib catches all anchor clicks and >>>> > performs ajax calls to get a new page, which is a fully render xhmtl >>>> > page. >>>> > The WAActionCallback doesn't currently allow such ajax callbacks. >>>> > They are blocked with this method: >>>> > isEnabledFor: aRequestContext >>>> > " ^true" >>>> > ^aRequestContext request isXmlHttpRequest not >>>> > What would be a good solution to enable such callbacks also for AJAX >>>> > calls. >>>> > >>>> > Cheers >>>> > Gerhard >>>> > _______________________________________________ >>>> > seaside-dev mailing list >>>> > [hidden email] >>>> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev >>>> > >>>> > >>>> >>>> >>>> >>>> -- >>>> Lukas Renggli >>>> www.lukas-renggli.ch >>>> _______________________________________________ >>>> seaside-dev mailing list >>>> [hidden email] >>>> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev >>> >> >> >> _______________________________________________ >> seaside-dev mailing list >> [hidden email] >> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev >> >> > > > > -- > Lukas Renggli > www.lukas-renggli.ch > _______________________________________________ > seaside-dev mailing list > [hidden email] > <http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev> > -- Lukas Renggli www.lukas-renggli.ch _______________________________________________ seaside-dev mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev |
Free forum by Nabble | Edit this page |