You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mlabs <ml...@gmail.com> on 2012/07/11 07:33:36 UTC

shared resource / JSON question

I have implemented a ByteArrayResource that serves up JSON depending on
various URL params....
I invoke it from the client using jQuery.getJSON() .. passing the url and
params....

first time around, coming off a full page refresh, the call works fine and
indeed if I put a breakpoint in my shared resource's getData() function I
see the incoming call.... and the params as expected...

over in the client javascript I have an element with a click-handler
defined. When it is clicked, I construct the URL with params and make the
same jQuery.getJSON() call...

this time my wicket-side breakpoint doesn't get hit, but the url is the same
as before, just slightly different params.

so it only seems to work off a full page refresh....

Q: any ideas? Is it some sort of weird caching thing? 
TIA

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/shared-resource-JSON-question-tp4650433.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: shared resource / JSON question

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Put a breakpoint in WicketFilter#doFilter() and see whether it gets hit.
If it doesn't then it is client side caching. Otherwise for some
reason Wicket doesn't map the url to the mounted resource - re-check
the url and the mount path.

On Wed, Jul 11, 2012 at 8:33 AM, mlabs <ml...@gmail.com> wrote:
> I have implemented a ByteArrayResource that serves up JSON depending on
> various URL params....
> I invoke it from the client using jQuery.getJSON() .. passing the url and
> params....
>
> first time around, coming off a full page refresh, the call works fine and
> indeed if I put a breakpoint in my shared resource's getData() function I
> see the incoming call.... and the params as expected...
>
> over in the client javascript I have an element with a click-handler
> defined. When it is clicked, I construct the URL with params and make the
> same jQuery.getJSON() call...
>
> this time my wicket-side breakpoint doesn't get hit, but the url is the same
> as before, just slightly different params.
>
> so it only seems to work off a full page refresh....
>
> Q: any ideas? Is it some sort of weird caching thing?
> TIA
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/shared-resource-JSON-question-tp4650433.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
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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