You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Matthew Goodson <ma...@spidertracks.com> on 2011/04/27 07:12:54 UTC

Re: WELCOME to users@wicket.apache.org

Hi guys,
I'm trying to find out if an ajax request has come from page that was loaded
from the browsers cache. Does anyone have any ideas of how I could achieve
this?
Thanks

Re: WELCOME to users@wicket.apache.org

Posted by Matthew Goodson <ma...@spidertracks.com>.
I didn't find a way to tell if the page was loaded from the browsers cache.
I found a work around that's specific to our application but doesn't really
solve my initial question.
Thanks

On Fri, Apr 29, 2011 at 9:53 AM, Jeremy Thomerson <jeremy@wickettraining.com
> wrote:

> Please post for future people who find this thread.
>
> On Thu, Apr 28, 2011 at 5:41 PM, Matthew Goodson
> <ma...@spidertracks.com>wrote:
>
> > I finally managed to figure out a workaround for this so it's all workin
> > now.
> > Thanks for your help!
> >
> > On Fri, Apr 29, 2011 at 8:49 AM, Matthew Goodson
> > <ma...@spidertracks.com>wrote:
> >
> > >
> > > Yeah on the javascript side it will fire off a request to the server to
> > > reload the tab each time. But wicket on the server thinks that the
> > requested
> > > tab is already loaded so ignores the request
> > >
> > > On Thu, Apr 28, 2011 at 9:07 PM, Martin Grigorov <mgrigorov@apache.org
> > >wrote:
> > >
> > >> The random parameter is there to prevent caching of the Ajax response.
> > >> AFAIK clicking on a tab will reload its content each time. I.e. Wicket
> > >> doesn't "think that the tab is already loaded".
> > >>
> > >> On Thu, Apr 28, 2011 at 12:41 AM, Matthew Goodson
> > >> <ma...@spidertracks.com> wrote:
> > >> > Yeah I'm not feeling too hopeful
> > >> > I have a tabbed panel which loads the tabs via ajax. When the page
> is
> > >> loaded
> > >> > from the browsers cache i.e. the user hits the back button, the ajax
> > >> request
> > >> > to load the tab is sent but wicket thinks that tab is already loaded
> > >> > (getSelectedTab()) so ignores the request.
> > >> >
> > >> > Here's the request that's sent. Wicket adds the random parameter.
> I'm
> > >> not
> > >> > sure if I removed the random param (somehow) if that would breaks
> > >> things.
> > >> >
> > >> >
> > >>
> >
> http://localhost?wicket:interface=:27::IActivePageBehaviorListener:21:2&wicket:ignoreIfNotActive=true&tab=privacysettings&random=0.8811610792763531
> > >> >
> > >> > Any ideas?
> > >> >
> > >> >
> > >> > On Wed, Apr 27, 2011 at 7:22 PM, Martin Grigorov <
> > mgrigorov@apache.org
> > >> >wrote:
> > >> >
> > >> >> Hi,
> > >> >>
> > >> >> I'm not sure whether this is possible at all.
> > >> >> Why do you need to do this ?
> > >> >>
> > >> >> On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
> > >> >> <ma...@spidertracks.com> wrote:
> > >> >> > Hi guys,
> > >> >> > I'm trying to find out if an ajax request has come from page that
> > was
> > >> >> loaded
> > >> >> > from the browsers cache. Does anyone have any ideas of how I
> could
> > >> >> achieve
> > >> >> > this?
> > >> >> > Thanks
> > >> >> >
> > >> >>
> > >> >>
> > >> >>
> > >> >> --
> > >> >> 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
> > >> >>
> > >> >>
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> 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
> > >>
> > >>
> > >
> > >
> > > --
> > >
> > > Matthew
> > >
> > > Software Engineer
> > >
> > > Matthew Goodson | spidertracks
> > >
> > > po box 5203 | 117a the square | Palmerston North 4441 | new zealand
> > >
> > > P: +64 6 353 3395 | M: +64 27 6969639
> > >
> > > E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
> > > www.spidertracks.com*
> > >
> > > spiderwatch - because in the rescue game, time = life.
> > >
> > >
> >
> >
> > --
> >
> > Matthew
> >
> > Software Engineer
> >
> > Matthew Goodson | spidertracks
> >
> > po box 5203 | 117a the square | Palmerston North 4441 | new zealand
> >
> > P: +64 6 353 3395 | M: +64 27 6969639
> >
> > E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
> > www.spidertracks.com*
> >
> > spiderwatch - because in the rescue game, time = life.
> >
>
>
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> *Need a CMS for Wicket?  Use Brix! http://brixcms.org*
>



-- 

Matthew

Software Engineer

Matthew Goodson | spidertracks

po box 5203 | 117a the square | Palmerston North 4441 | new zealand

P: +64 6 353 3395 | M: +64 27 6969639

E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
www.spidertracks.com*

spiderwatch - because in the rescue game, time = life.

Re: WELCOME to users@wicket.apache.org

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Please post for future people who find this thread.

On Thu, Apr 28, 2011 at 5:41 PM, Matthew Goodson
<ma...@spidertracks.com>wrote:

> I finally managed to figure out a workaround for this so it's all workin
> now.
> Thanks for your help!
>
> On Fri, Apr 29, 2011 at 8:49 AM, Matthew Goodson
> <ma...@spidertracks.com>wrote:
>
> >
> > Yeah on the javascript side it will fire off a request to the server to
> > reload the tab each time. But wicket on the server thinks that the
> requested
> > tab is already loaded so ignores the request
> >
> > On Thu, Apr 28, 2011 at 9:07 PM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
> >
> >> The random parameter is there to prevent caching of the Ajax response.
> >> AFAIK clicking on a tab will reload its content each time. I.e. Wicket
> >> doesn't "think that the tab is already loaded".
> >>
> >> On Thu, Apr 28, 2011 at 12:41 AM, Matthew Goodson
> >> <ma...@spidertracks.com> wrote:
> >> > Yeah I'm not feeling too hopeful
> >> > I have a tabbed panel which loads the tabs via ajax. When the page is
> >> loaded
> >> > from the browsers cache i.e. the user hits the back button, the ajax
> >> request
> >> > to load the tab is sent but wicket thinks that tab is already loaded
> >> > (getSelectedTab()) so ignores the request.
> >> >
> >> > Here's the request that's sent. Wicket adds the random parameter. I'm
> >> not
> >> > sure if I removed the random param (somehow) if that would breaks
> >> things.
> >> >
> >> >
> >>
> http://localhost?wicket:interface=:27::IActivePageBehaviorListener:21:2&wicket:ignoreIfNotActive=true&tab=privacysettings&random=0.8811610792763531
> >> >
> >> > Any ideas?
> >> >
> >> >
> >> > On Wed, Apr 27, 2011 at 7:22 PM, Martin Grigorov <
> mgrigorov@apache.org
> >> >wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I'm not sure whether this is possible at all.
> >> >> Why do you need to do this ?
> >> >>
> >> >> On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
> >> >> <ma...@spidertracks.com> wrote:
> >> >> > Hi guys,
> >> >> > I'm trying to find out if an ajax request has come from page that
> was
> >> >> loaded
> >> >> > from the browsers cache. Does anyone have any ideas of how I could
> >> >> achieve
> >> >> > this?
> >> >> > Thanks
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> 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
> >> >>
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> 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
> >>
> >>
> >
> >
> > --
> >
> > Matthew
> >
> > Software Engineer
> >
> > Matthew Goodson | spidertracks
> >
> > po box 5203 | 117a the square | Palmerston North 4441 | new zealand
> >
> > P: +64 6 353 3395 | M: +64 27 6969639
> >
> > E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
> > www.spidertracks.com*
> >
> > spiderwatch - because in the rescue game, time = life.
> >
> >
>
>
> --
>
> Matthew
>
> Software Engineer
>
> Matthew Goodson | spidertracks
>
> po box 5203 | 117a the square | Palmerston North 4441 | new zealand
>
> P: +64 6 353 3395 | M: +64 27 6969639
>
> E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
> www.spidertracks.com*
>
> spiderwatch - because in the rescue game, time = life.
>



-- 
Jeremy Thomerson
http://wickettraining.com
*Need a CMS for Wicket?  Use Brix! http://brixcms.org*

Re: WELCOME to users@wicket.apache.org

Posted by Matthew Goodson <ma...@spidertracks.com>.
I finally managed to figure out a workaround for this so it's all workin
now.
Thanks for your help!

On Fri, Apr 29, 2011 at 8:49 AM, Matthew Goodson
<ma...@spidertracks.com>wrote:

>
> Yeah on the javascript side it will fire off a request to the server to
> reload the tab each time. But wicket on the server thinks that the requested
> tab is already loaded so ignores the request
>
> On Thu, Apr 28, 2011 at 9:07 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> The random parameter is there to prevent caching of the Ajax response.
>> AFAIK clicking on a tab will reload its content each time. I.e. Wicket
>> doesn't "think that the tab is already loaded".
>>
>> On Thu, Apr 28, 2011 at 12:41 AM, Matthew Goodson
>> <ma...@spidertracks.com> wrote:
>> > Yeah I'm not feeling too hopeful
>> > I have a tabbed panel which loads the tabs via ajax. When the page is
>> loaded
>> > from the browsers cache i.e. the user hits the back button, the ajax
>> request
>> > to load the tab is sent but wicket thinks that tab is already loaded
>> > (getSelectedTab()) so ignores the request.
>> >
>> > Here's the request that's sent. Wicket adds the random parameter. I'm
>> not
>> > sure if I removed the random param (somehow) if that would breaks
>> things.
>> >
>> >
>> http://localhost?wicket:interface=:27::IActivePageBehaviorListener:21:2&wicket:ignoreIfNotActive=true&tab=privacysettings&random=0.8811610792763531
>> >
>> > Any ideas?
>> >
>> >
>> > On Wed, Apr 27, 2011 at 7:22 PM, Martin Grigorov <mgrigorov@apache.org
>> >wrote:
>> >
>> >> Hi,
>> >>
>> >> I'm not sure whether this is possible at all.
>> >> Why do you need to do this ?
>> >>
>> >> On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
>> >> <ma...@spidertracks.com> wrote:
>> >> > Hi guys,
>> >> > I'm trying to find out if an ajax request has come from page that was
>> >> loaded
>> >> > from the browsers cache. Does anyone have any ideas of how I could
>> >> achieve
>> >> > this?
>> >> > Thanks
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> 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
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> 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
>>
>>
>
>
> --
>
> Matthew
>
> Software Engineer
>
> Matthew Goodson | spidertracks
>
> po box 5203 | 117a the square | Palmerston North 4441 | new zealand
>
> P: +64 6 353 3395 | M: +64 27 6969639
>
> E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
> www.spidertracks.com*
>
> spiderwatch - because in the rescue game, time = life.
>
>


-- 

Matthew

Software Engineer

Matthew Goodson | spidertracks

po box 5203 | 117a the square | Palmerston North 4441 | new zealand

P: +64 6 353 3395 | M: +64 27 6969639

E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
www.spidertracks.com*

spiderwatch - because in the rescue game, time = life.

Re: WELCOME to users@wicket.apache.org

Posted by Matthew Goodson <ma...@spidertracks.com>.
Yeah on the javascript side it will fire off a request to the server to
reload the tab each time. But wicket on the server thinks that the requested
tab is already loaded so ignores the request

On Thu, Apr 28, 2011 at 9:07 PM, Martin Grigorov <mg...@apache.org>wrote:

> The random parameter is there to prevent caching of the Ajax response.
> AFAIK clicking on a tab will reload its content each time. I.e. Wicket
> doesn't "think that the tab is already loaded".
>
> On Thu, Apr 28, 2011 at 12:41 AM, Matthew Goodson
> <ma...@spidertracks.com> wrote:
> > Yeah I'm not feeling too hopeful
> > I have a tabbed panel which loads the tabs via ajax. When the page is
> loaded
> > from the browsers cache i.e. the user hits the back button, the ajax
> request
> > to load the tab is sent but wicket thinks that tab is already loaded
> > (getSelectedTab()) so ignores the request.
> >
> > Here's the request that's sent. Wicket adds the random parameter. I'm not
> > sure if I removed the random param (somehow) if that would breaks things.
> >
> >
> http://localhost?wicket:interface=:27::IActivePageBehaviorListener:21:2&wicket:ignoreIfNotActive=true&tab=privacysettings&random=0.8811610792763531
> >
> > Any ideas?
> >
> >
> > On Wed, Apr 27, 2011 at 7:22 PM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
> >
> >> Hi,
> >>
> >> I'm not sure whether this is possible at all.
> >> Why do you need to do this ?
> >>
> >> On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
> >> <ma...@spidertracks.com> wrote:
> >> > Hi guys,
> >> > I'm trying to find out if an ajax request has come from page that was
> >> loaded
> >> > from the browsers cache. Does anyone have any ideas of how I could
> >> achieve
> >> > this?
> >> > Thanks
> >> >
> >>
> >>
> >>
> >> --
> >> 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
> >>
> >>
> >
>
>
>
> --
> 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
>
>


-- 

Matthew

Software Engineer

Matthew Goodson | spidertracks

po box 5203 | 117a the square | Palmerston North 4441 | new zealand

P: +64 6 353 3395 | M: +64 27 6969639

E: *matthew@spidertracks.co.nz* <ma...@spidertracks.co.nz>   *
www.spidertracks.com*

spiderwatch - because in the rescue game, time = life.

Re: WELCOME to users@wicket.apache.org

Posted by Martin Grigorov <mg...@apache.org>.
The random parameter is there to prevent caching of the Ajax response.
AFAIK clicking on a tab will reload its content each time. I.e. Wicket
doesn't "think that the tab is already loaded".

On Thu, Apr 28, 2011 at 12:41 AM, Matthew Goodson
<ma...@spidertracks.com> wrote:
> Yeah I'm not feeling too hopeful
> I have a tabbed panel which loads the tabs via ajax. When the page is loaded
> from the browsers cache i.e. the user hits the back button, the ajax request
> to load the tab is sent but wicket thinks that tab is already loaded
> (getSelectedTab()) so ignores the request.
>
> Here's the request that's sent. Wicket adds the random parameter. I'm not
> sure if I removed the random param (somehow) if that would breaks things.
>
> http://localhost?wicket:interface=:27::IActivePageBehaviorListener:21:2&wicket:ignoreIfNotActive=true&tab=privacysettings&random=0.8811610792763531
>
> Any ideas?
>
>
> On Wed, Apr 27, 2011 at 7:22 PM, Martin Grigorov <mg...@apache.org>wrote:
>
>> Hi,
>>
>> I'm not sure whether this is possible at all.
>> Why do you need to do this ?
>>
>> On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
>> <ma...@spidertracks.com> wrote:
>> > Hi guys,
>> > I'm trying to find out if an ajax request has come from page that was
>> loaded
>> > from the browsers cache. Does anyone have any ideas of how I could
>> achieve
>> > this?
>> > Thanks
>> >
>>
>>
>>
>> --
>> 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
>>
>>
>



-- 
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


Re: WELCOME to users@wicket.apache.org

Posted by Matthew Goodson <ma...@spidertracks.com>.
Yeah I'm not feeling too hopeful
I have a tabbed panel which loads the tabs via ajax. When the page is loaded
from the browsers cache i.e. the user hits the back button, the ajax request
to load the tab is sent but wicket thinks that tab is already loaded
(getSelectedTab()) so ignores the request.

Here's the request that's sent. Wicket adds the random parameter. I'm not
sure if I removed the random param (somehow) if that would breaks things.

http://localhost?wicket:interface=:27::IActivePageBehaviorListener:21:2&wicket:ignoreIfNotActive=true&tab=privacysettings&random=0.8811610792763531

Any ideas?


On Wed, Apr 27, 2011 at 7:22 PM, Martin Grigorov <mg...@apache.org>wrote:

> Hi,
>
> I'm not sure whether this is possible at all.
> Why do you need to do this ?
>
> On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
> <ma...@spidertracks.com> wrote:
> > Hi guys,
> > I'm trying to find out if an ajax request has come from page that was
> loaded
> > from the browsers cache. Does anyone have any ideas of how I could
> achieve
> > this?
> > Thanks
> >
>
>
>
> --
> 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
>
>

Re: WELCOME to users@wicket.apache.org

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

I'm not sure whether this is possible at all.
Why do you need to do this ?

On Wed, Apr 27, 2011 at 8:12 AM, Matthew Goodson
<ma...@spidertracks.com> wrote:
> Hi guys,
> I'm trying to find out if an ajax request has come from page that was loaded
> from the browsers cache. Does anyone have any ideas of how I could achieve
> this?
> Thanks
>



-- 
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