You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ryan Crumley <cr...@gmail.com> on 2010/09/22 04:58:11 UTC

chrome + wicket ajax + back button = problem?

All,

I ran into strange behavior involving wicket ajax updates + chrome + back
button. I am pretty sure the issue is not caused by wicket but I am hoping
the problem might sound familiar to someone and they can point me in the
right direction. The scenario goes like this:

- An ajax request is made that updates the DOM.
- The user navigates to another page by clicking on a link.
- The user uses the browser back button to go back to the original page.

After clicking back Google Chrome shows the page as it was originally
rendered (before the DOM update). All other browsers show the page as it was
when the user left the page (with the DOM update). Besides the possibility
of showing stale data the other problem is that the page state has been
altered by the ajax request and links that were originally rendered may no
longer be valid.

I found a few links where people are having similar issues:

http://www.maintaino.com/nuts-and-bolts/2010/04/08/teaching-chrome-not-to-cache-your-rails-pages/

Possibly related to using jQuery and/or window.onUnload() and "bfcache":

http://stackoverflow.com/questions/158319/cross-browser-onload-event-and-the-back-button
https://developer.mozilla.org/En/Using_Firefox_1.5_caching

In addition to using Wicket 1.4.12 I am also using jQuery 1.4.2 and google
analytics on these pages. I don't think any unload handlers have been added
however my only check was looking at all the attributes on the "window"
object via the inspector.

Has anyone else seen similar behavior? Even better, anyone else have a
solution? You may be seeing errors like this one in your logs:

org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.WicketRuntimeException: component wid1:wid2:1:wid3 not
found on page com.foo.xxx


Thanks!

Ryan

Re: Visural Wicket - Maven

Posted by Josh Kamau <jo...@gmail.com>.
Hi.

I use visural wicket with maven and havent had problems so far. Here is a
section of my pom.xml. If it doesnt work, then may be something changed
after my maven had already done the download.

        <dependency>
            <groupId>com.visural</groupId>
            <artifactId>visural-common</artifactId>
            <version>0.4.3</version>
        </dependency>

        <dependency>
            <groupId>com.visural</groupId>
            <artifactId>visural-wicket</artifactId>
            <version>0.6.5</version>
        </dependency>




    <repositories>
        <repository>
            <id>visural-common</id>
            <name>visural-common</name>
            <url>
http://visural-common.googlecode.com/svn/trunk/visural-common/maven/</url>
        </repository>
        <repository>
            <id>visural-wicket</id>
            <name>visural-wicket</name>
            <url>
http://visural-wicket.googlecode.com/svn/trunk/visural-wicket/maven/</url>
        </repository>

On Sat, Mar 19, 2011 at 1:16 AM, Shelli Orton <Sh...@sjrb.ca> wrote:

> Hi,
>
> Has anybody used Visural Wicket with Maven?  I set up my repositories as
> per the information on this page:
>
> http://code.google.com/p/visural-wicket/wiki/MavenSupport
>
> The visural-common pom and jar files downloaded are empty even though
> they're not on the server.  However, there isn't a directory for
> visural-wicket on the server.
>
> Do I need to manually add the files to my repository?
>
> Thanks,
>
> -----Original Message-----
> From: Shelli Orton
> Sent: 18 March 2011 11:20 AM
> To: users@wicket.apache.org
> Subject: RE: Drop Down Choice
>
> Hi,
>
> The wicket.visural.net first example looks like exactly what I need.
>
> Thanks!
>
> Shelli
>
> -----Original Message-----
> From: nino martinez wael [mailto:nino.martinez.wael@gmail.com]
> Sent: 18 March 2011 11:05 AM
> To: users@wicket.apache.org
> Subject: Re: Drop Down Choice
>
> theres this one (though not dropdown)
>
> http://www.wicket-library.com/wicket-examples/ajax/autocomplete<http://w
> ww.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414
> 790D6B5E7ACECC809CB9E9C9CEB?0<http://ww.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414%0A790D6B5E7ACECC809CB9E9C9CEB?0>
> >
>
> Or this one if you want a drop down:
> http://wicket.visural.net/examples/app/dropdown
>
> -Nino
>
> <http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessio
> nid=FE414790D6B5E7ACECC809CB9E9C9CEB?0>
>
> 2011/3/18 Shelli Orton <Sh...@sjrb.ca>
>
> > Hi,
> >
> > I've been looking for a Wicket drop down widget where one can choose
> an
> > item from the list by typing more than the first character.  For
> > example, if my list contains the following values:
> >
> > One
> > Two
> > Three
> > Four
> > Five
> >
> > typing "T" would select "Two", but typing "Th" would select "Three".
> Is
> > this possible in Wicket?
> >
> > Thanks!
> >
> > Shelli
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Visural Wicket - Maven

Posted by Shelli Orton <Sh...@sjrb.ca>.
Hi,

Has anybody used Visural Wicket with Maven?  I set up my repositories as
per the information on this page:

http://code.google.com/p/visural-wicket/wiki/MavenSupport

The visural-common pom and jar files downloaded are empty even though
they're not on the server.  However, there isn't a directory for
visural-wicket on the server.

Do I need to manually add the files to my repository?

Thanks,

-----Original Message-----
From: Shelli Orton 
Sent: 18 March 2011 11:20 AM
To: users@wicket.apache.org
Subject: RE: Drop Down Choice

Hi,

The wicket.visural.net first example looks like exactly what I need.

Thanks!

Shelli

-----Original Message-----
From: nino martinez wael [mailto:nino.martinez.wael@gmail.com] 
Sent: 18 March 2011 11:05 AM
To: users@wicket.apache.org
Subject: Re: Drop Down Choice

theres this one (though not dropdown)

http://www.wicket-library.com/wicket-examples/ajax/autocomplete<http://w
ww.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414
790D6B5E7ACECC809CB9E9C9CEB?0>

Or this one if you want a drop down:
http://wicket.visural.net/examples/app/dropdown

-Nino

<http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessio
nid=FE414790D6B5E7ACECC809CB9E9C9CEB?0>

2011/3/18 Shelli Orton <Sh...@sjrb.ca>

> Hi,
>
> I've been looking for a Wicket drop down widget where one can choose
an
> item from the list by typing more than the first character.  For
> example, if my list contains the following values:
>
> One
> Two
> Three
> Four
> Five
>
> typing "T" would select "Two", but typing "Th" would select "Three".
Is
> this possible in Wicket?
>
> Thanks!
>
> Shelli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


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


RE: Drop Down Choice

Posted by Shelli Orton <Sh...@sjrb.ca>.
Hi,

The wicket.visural.net first example looks like exactly what I need.

Thanks!

Shelli

-----Original Message-----
From: nino martinez wael [mailto:nino.martinez.wael@gmail.com] 
Sent: 18 March 2011 11:05 AM
To: users@wicket.apache.org
Subject: Re: Drop Down Choice

theres this one (though not dropdown)

http://www.wicket-library.com/wicket-examples/ajax/autocomplete<http://w
ww.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414
790D6B5E7ACECC809CB9E9C9CEB?0>

Or this one if you want a drop down:
http://wicket.visural.net/examples/app/dropdown

-Nino

<http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessio
nid=FE414790D6B5E7ACECC809CB9E9C9CEB?0>

2011/3/18 Shelli Orton <Sh...@sjrb.ca>

> Hi,
>
> I've been looking for a Wicket drop down widget where one can choose
an
> item from the list by typing more than the first character.  For
> example, if my list contains the following values:
>
> One
> Two
> Three
> Four
> Five
>
> typing "T" would select "Two", but typing "Th" would select "Three".
Is
> this possible in Wicket?
>
> Thanks!
>
> Shelli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Drop Down Choice

Posted by nino martinez wael <ni...@gmail.com>.
theres this one (though not dropdown)

http://www.wicket-library.com/wicket-examples/ajax/autocomplete<http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414790D6B5E7ACECC809CB9E9C9CEB?0>

Or this one if you want a drop down:
http://wicket.visural.net/examples/app/dropdown

-Nino

<http://www.wicket-library.com/wicket-examples/ajax/autocomplete;jsessionid=FE414790D6B5E7ACECC809CB9E9C9CEB?0>

2011/3/18 Shelli Orton <Sh...@sjrb.ca>

> Hi,
>
> I've been looking for a Wicket drop down widget where one can choose an
> item from the list by typing more than the first character.  For
> example, if my list contains the following values:
>
> One
> Two
> Three
> Four
> Five
>
> typing "T" would select "Two", but typing "Th" would select "Three".  Is
> this possible in Wicket?
>
> Thanks!
>
> Shelli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Drop Down Choice

Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Hi!

1. Invisible mode is always possible.

2. Maybe autocompletetextfield will be ok?

3. You can integrate pretty easily a jquery skin.

**
Martin

2011/3/18 Shelli Orton <Sh...@sjrb.ca>:
> Hi,
>
> I've been looking for a Wicket drop down widget where one can choose an
> item from the list by typing more than the first character.  For
> example, if my list contains the following values:
>
> One
> Two
> Three
> Four
> Five
>
> typing "T" would select "Two", but typing "Th" would select "Three".  Is
> this possible in Wicket?
>
> Thanks!
>
> Shelli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


RE: Drop Down Choice

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> typing "T" would select "Two", but typing "Th" would select "Three".  Is
> this possible in Wicket?

This is the way well-behaved modern browsers already work :)

- Tor I.

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


Drop Down Choice

Posted by Shelli Orton <Sh...@sjrb.ca>.
Hi,

I've been looking for a Wicket drop down widget where one can choose an
item from the list by typing more than the first character.  For
example, if my list contains the following values:

One
Two
Three
Four
Five

typing "T" would select "Two", but typing "Th" would select "Three".  Is
this possible in Wicket?

Thanks!

Shelli

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


Re: chrome + wicket ajax + back button = problem?

Posted by Pointbreak <po...@ml1.net>.
See https://issues.apache.org/jira/browse/WICKET-923 for a solution.

On Mon, 11 Oct 2010 09:31 -0500, "Ryan Crumley" <cr...@gmail.com>
wrote:
> I have (I am using MixedParamHybridUrlCodingStrategy) however in this
> case
> the browser is not contacting the server on back button click so the
> UrlCodingStrategy does not come into play.
> 
> Ryan
> 
> On Wed, Oct 6, 2010 at 4:13 PM, <MZ...@osc.state.ny.us> wrote:
> 
> > I've had similar issues, have you tried  HybridUrlCodingStrategy?
> >
> >
> >
> > Notice: This communication, including any attachments, is intended solely
> > for the use of the individual or entity to which it is addressed. This
> > communication may contain information that is protected from disclosure
> > under State and/or Federal law. Please notify the sender immediately if
> > you have received this communication in error and delete this email from
> > your system. If you are not the intended recipient, you are requested not
> > to disclose, copy, distribute or take any action in reliance on the
> > contents of this information.
> 

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


Re: chrome + wicket ajax + back button = problem?

Posted by Ryan Crumley <cr...@gmail.com>.
I have (I am using MixedParamHybridUrlCodingStrategy) however in this case
the browser is not contacting the server on back button click so the
UrlCodingStrategy does not come into play.

Ryan

On Wed, Oct 6, 2010 at 4:13 PM, <MZ...@osc.state.ny.us> wrote:

> I've had similar issues, have you tried  HybridUrlCodingStrategy?
>
>
>
> Notice: This communication, including any attachments, is intended solely
> for the use of the individual or entity to which it is addressed. This
> communication may contain information that is protected from disclosure
> under State and/or Federal law. Please notify the sender immediately if
> you have received this communication in error and delete this email from
> your system. If you are not the intended recipient, you are requested not
> to disclose, copy, distribute or take any action in reliance on the
> contents of this information.

Re: chrome + wicket ajax + back button = problem?

Posted by MZ...@osc.state.ny.us.
I've had similar issues, have you tried  HybridUrlCodingStrategy?



Notice: This communication, including any attachments, is intended solely 
for the use of the individual or entity to which it is addressed. This 
communication may contain information that is protected from disclosure 
under State and/or Federal law. Please notify the sender immediately if 
you have received this communication in error and delete this email from 
your system. If you are not the intended recipient, you are requested not 
to disclose, copy, distribute or take any action in reliance on the 
contents of this information.

Re: chrome + wicket ajax + back button = problem?

Posted by Ryan Crumley <cr...@gmail.com>.
Just to clarify:

The page in the example link I sent is stateless (it's static html). The
other point is that Chrome and IE do not fetch the original page on back
button click. They are serving the original html straight from the cache
(without the DOM modifications).

It sounds like the only "fix" is to update the page headers so that no
browser will ever cache the page. That seems like an overkill but so far I
haven't found any other solution that works across browsers. This seems like
a very common scenario... is it also very common to set all the no-cache
headers?

Ryan

On Sun, Oct 3, 2010 at 5:56 PM, Zilvinas Vilutis <ci...@gmail.com> wrote:

> Yes, it is not repeatable on FF because FF does page caching which IE
> does not for "Back" history.
>
> Your page must be stateless on the server side.
>
> Žilvinas Vilutis
>
> Mobile:   (+370) 652 38353
> E-mail:   cikasfm@gmail.com
>
>
>
> On Sun, Oct 3, 2010 at 3:47 PM, Ryan Crumley <cr...@gmail.com> wrote:
> > What is interesting is this is not a wicket specific issue however it is
> > more serious when using wicket than other frameworks due to the expired
> > links causing errors when they reappear.
> >
> > I created a very simple version of the problem. Chrome and IE8 exhibits
> the
> > problem but Firefox and Safari do not:
> >
> > http://www.cupofcrumley.com/chrome-test/Page1.html
> >
> > <http://www.cupofcrumley.com/chrome-test/Page1.html>Ryan
> >
> > On Fri, Sep 24, 2010 at 1:48 AM, Peter Karich <pe...@yahoo.de> wrote:
> >
> >> I had the same problem ...
> >> > Take a look at
> >> >
> >>
> http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/
> >> >
> >>
> >> isn't there a better fix? E.g. it seems to me that this 'hack' avoids
> >> client-side js caching (or is this a wrong observation)?
> >>
> >> Regards,
> >> Peter.
> >>
> >>
> >>
> >>
> >> --
> >> http://jetwick.com twitter search prototype
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: chrome + wicket ajax + back button = problem?

Posted by Zilvinas Vilutis <ci...@gmail.com>.
Yes, it is not repeatable on FF because FF does page caching which IE
does not for "Back" history.

Your page must be stateless on the server side.

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cikasfm@gmail.com



On Sun, Oct 3, 2010 at 3:47 PM, Ryan Crumley <cr...@gmail.com> wrote:
> What is interesting is this is not a wicket specific issue however it is
> more serious when using wicket than other frameworks due to the expired
> links causing errors when they reappear.
>
> I created a very simple version of the problem. Chrome and IE8 exhibits the
> problem but Firefox and Safari do not:
>
> http://www.cupofcrumley.com/chrome-test/Page1.html
>
> <http://www.cupofcrumley.com/chrome-test/Page1.html>Ryan
>
> On Fri, Sep 24, 2010 at 1:48 AM, Peter Karich <pe...@yahoo.de> wrote:
>
>> I had the same problem ...
>> > Take a look at
>> >
>> http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/
>> >
>>
>> isn't there a better fix? E.g. it seems to me that this 'hack' avoids
>> client-side js caching (or is this a wrong observation)?
>>
>> Regards,
>> Peter.
>>
>>
>>
>>
>> --
>> http://jetwick.com twitter search prototype
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

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


Re: chrome + wicket ajax + back button = problem?

Posted by Ryan Crumley <cr...@gmail.com>.
What is interesting is this is not a wicket specific issue however it is
more serious when using wicket than other frameworks due to the expired
links causing errors when they reappear.

I created a very simple version of the problem. Chrome and IE8 exhibits the
problem but Firefox and Safari do not:

http://www.cupofcrumley.com/chrome-test/Page1.html

<http://www.cupofcrumley.com/chrome-test/Page1.html>Ryan

On Fri, Sep 24, 2010 at 1:48 AM, Peter Karich <pe...@yahoo.de> wrote:

> I had the same problem ...
> > Take a look at
> >
> http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/
> >
>
> isn't there a better fix? E.g. it seems to me that this 'hack' avoids
> client-side js caching (or is this a wrong observation)?
>
> Regards,
> Peter.
>
>
>
>
> --
> http://jetwick.com twitter search prototype
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: chrome + wicket ajax + back button = problem?

Posted by Peter Karich <pe...@yahoo.de>.
I had the same problem ...
> Take a look at
> http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/
>   

isn't there a better fix? E.g. it seems to me that this 'hack' avoids
client-side js caching (or is this a wrong observation)?

Regards,
Peter.




-- 
http://jetwick.com twitter search prototype


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


Re: chrome + wicket ajax + back button = problem?

Posted by Richard Nichols <rn...@visural.com>.
Take a look at
http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/


On Wed, Sep 22, 2010 at 12:58 PM, Ryan Crumley <cr...@gmail.com> wrote:

> All,
>
> I ran into strange behavior involving wicket ajax updates + chrome + back
> button. I am pretty sure the issue is not caused by wicket but I am hoping
> the problem might sound familiar to someone and they can point me in the
> right direction. The scenario goes like this:
>
> - An ajax request is made that updates the DOM.
> - The user navigates to another page by clicking on a link.
> - The user uses the browser back button to go back to the original page.
>
> After clicking back Google Chrome shows the page as it was originally
> rendered (before the DOM update). All other browsers show the page as it
> was
> when the user left the page (with the DOM update). Besides the possibility
> of showing stale data the other problem is that the page state has been
> altered by the ajax request and links that were originally rendered may no
> longer be valid.
>
> I found a few links where people are having similar issues:
>
>
> http://www.maintaino.com/nuts-and-bolts/2010/04/08/teaching-chrome-not-to-cache-your-rails-pages/
>
> Possibly related to using jQuery and/or window.onUnload() and "bfcache":
>
>
> http://stackoverflow.com/questions/158319/cross-browser-onload-event-and-the-back-button
> https://developer.mozilla.org/En/Using_Firefox_1.5_caching
>
> In addition to using Wicket 1.4.12 I am also using jQuery 1.4.2 and google
> analytics on these pages. I don't think any unload handlers have been added
> however my only check was looking at all the attributes on the "window"
> object via the inspector.
>
> Has anyone else seen similar behavior? Even better, anyone else have a
> solution? You may be seeing errors like this one in your logs:
>
> org.apache.wicket.protocol.http.request.InvalidUrlException:
> org.apache.wicket.WicketRuntimeException: component wid1:wid2:1:wid3 not
> found on page com.foo.xxx
>
>
> Thanks!
>
> Ryan
>



-- 
Richard Nichols
http://www.richardnichols.net/ :: http://onmydoorstep.com.au/