Re: Panel switching and back button
We use ReallySimpleHistory (http://code.google.com/p/reallysimplehistory/) for this. Every AjaxLink (or component+AjaxEventBehavior) records the url of the current page + some indicator in the hash path (e.g. '../blah/page#someId') in rsh.js (via AjaxCallDecorator). Later when the user presses 'back button' the request is to the same page with the id in the hash. Then 'onload' JS function checks the location.hash and if it is nonEmpty it makes something like this: Wicket.$('someId').click() and this actually calls the behavior which will set the page's state back to the previous one. this works only for ajax "navigation". The models behind are always the latest version. If you need the previous version of the models then you need to create a new version of the page on every Ajax request too. But this is getting complex. On Thu, 2008-06-26 at 16:08 +0300, Cristi Manole wrote: > yes, I know, I'm trying to figure out a solution myself. > > I was sure though somebody else ran into this. :) > > On Thu, Jun 26, 2008 at 3:28 PM, Thomas Mäder <[EMAIL PROTECTED]> wrote: > > > Aha, the problem is that ajax does not cause a history entry to be created. > > I've seen workarounds for this (not with wicket, though) which reload a > > hidden IFrame each time they make a relevant change. I can't see right now > > how that helps you in wicket, tough. > > > > Thomas > > > > > > On Thu, Jun 26, 2008 at 1:56 PM, Cristi Manole <[EMAIL PROTECTED]> > > wrote: > > > > > yes, with Ajax > > > > > > On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder <[EMAIL PROTECTED]> > > > wrote: > > > > > > > I would expect that to happen by default. Replacing a panel should > > create > > > a > > > > new page version which should change the Page URL. Are you using AJAX? > > > > > > > > Thomas > > > > > > > > On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole < > > [EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > Hello, > > > > > > > > > > I am implementing navigation through my application by switching > > > panels. > > > > > > > > > > When the user presses the back button, I'd like to show the > > previously > > > > > displayed panel. Is this possible? > > > > > > > > > > Thanks, > > > > > Cristi Manole > > > > > > > > > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Panel switching and back button
will try that. tks On Thu, Jun 26, 2008 at 4:16 PM, Thomas Mäder <[EMAIL PROTECTED]> wrote: > Hmhhh... isn't there a Javascript function which allows to replace the URL > of the current page in the history? I'm not sure this would work, but > couldn't you try this: > > 1) replace the panel > 2) reload the IFrame > 3) now manipulate the browser history to point to the currect URL for the > current page version > > Thomas > > On Thu, Jun 26, 2008 at 3:08 PM, Cristi Manole <[EMAIL PROTECTED]> > wrote: > > > yes, I know, I'm trying to figure out a solution myself. > > > > I was sure though somebody else ran into this. :) > > > > On Thu, Jun 26, 2008 at 3:28 PM, Thomas Mäder <[EMAIL PROTECTED]> > > wrote: > > > > > Aha, the problem is that ajax does not cause a history entry to be > > created. > > > I've seen workarounds for this (not with wicket, though) which reload a > > > hidden IFrame each time they make a relevant change. I can't see right > > now > > > how that helps you in wicket, tough. > > > > > > Thomas > > > > > > > > > On Thu, Jun 26, 2008 at 1:56 PM, Cristi Manole <[EMAIL PROTECTED] > > > > > wrote: > > > > > > > yes, with Ajax > > > > > > > > On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder <[EMAIL PROTECTED] > > > > > > wrote: > > > > > > > > > I would expect that to happen by default. Replacing a panel should > > > create > > > > a > > > > > new page version which should change the Page URL. Are you using > > AJAX? > > > > > > > > > > Thomas > > > > > > > > > > On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole < > > > [EMAIL PROTECTED]> > > > > > wrote: > > > > > > > > > > > Hello, > > > > > > > > > > > > I am implementing navigation through my application by switching > > > > panels. > > > > > > > > > > > > When the user presses the back button, I'd like to show the > > > previously > > > > > > displayed panel. Is this possible? > > > > > > > > > > > > Thanks, > > > > > > Cristi Manole > > > > > > > > > > > > > > > > > > > > >
Re: Panel switching and back button
Hmhhh... isn't there a Javascript function which allows to replace the URL of the current page in the history? I'm not sure this would work, but couldn't you try this: 1) replace the panel 2) reload the IFrame 3) now manipulate the browser history to point to the currect URL for the current page version Thomas On Thu, Jun 26, 2008 at 3:08 PM, Cristi Manole <[EMAIL PROTECTED]> wrote: > yes, I know, I'm trying to figure out a solution myself. > > I was sure though somebody else ran into this. :) > > On Thu, Jun 26, 2008 at 3:28 PM, Thomas Mäder <[EMAIL PROTECTED]> > wrote: > > > Aha, the problem is that ajax does not cause a history entry to be > created. > > I've seen workarounds for this (not with wicket, though) which reload a > > hidden IFrame each time they make a relevant change. I can't see right > now > > how that helps you in wicket, tough. > > > > Thomas > > > > > > On Thu, Jun 26, 2008 at 1:56 PM, Cristi Manole <[EMAIL PROTECTED]> > > wrote: > > > > > yes, with Ajax > > > > > > On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder <[EMAIL PROTECTED]> > > > wrote: > > > > > > > I would expect that to happen by default. Replacing a panel should > > create > > > a > > > > new page version which should change the Page URL. Are you using > AJAX? > > > > > > > > Thomas > > > > > > > > On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole < > > [EMAIL PROTECTED]> > > > > wrote: > > > > > > > > > Hello, > > > > > > > > > > I am implementing navigation through my application by switching > > > panels. > > > > > > > > > > When the user presses the back button, I'd like to show the > > previously > > > > > displayed panel. Is this possible? > > > > > > > > > > Thanks, > > > > > Cristi Manole > > > > > > > > > > > > > > >
Re: Panel switching and back button
yes, I know, I'm trying to figure out a solution myself. I was sure though somebody else ran into this. :) On Thu, Jun 26, 2008 at 3:28 PM, Thomas Mäder <[EMAIL PROTECTED]> wrote: > Aha, the problem is that ajax does not cause a history entry to be created. > I've seen workarounds for this (not with wicket, though) which reload a > hidden IFrame each time they make a relevant change. I can't see right now > how that helps you in wicket, tough. > > Thomas > > > On Thu, Jun 26, 2008 at 1:56 PM, Cristi Manole <[EMAIL PROTECTED]> > wrote: > > > yes, with Ajax > > > > On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder <[EMAIL PROTECTED]> > > wrote: > > > > > I would expect that to happen by default. Replacing a panel should > create > > a > > > new page version which should change the Page URL. Are you using AJAX? > > > > > > Thomas > > > > > > On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole < > [EMAIL PROTECTED]> > > > wrote: > > > > > > > Hello, > > > > > > > > I am implementing navigation through my application by switching > > panels. > > > > > > > > When the user presses the back button, I'd like to show the > previously > > > > displayed panel. Is this possible? > > > > > > > > Thanks, > > > > Cristi Manole > > > > > > > > > >
Re: Panel switching and back button
Aha, the problem is that ajax does not cause a history entry to be created. I've seen workarounds for this (not with wicket, though) which reload a hidden IFrame each time they make a relevant change. I can't see right now how that helps you in wicket, tough. Thomas On Thu, Jun 26, 2008 at 1:56 PM, Cristi Manole <[EMAIL PROTECTED]> wrote: > yes, with Ajax > > On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder <[EMAIL PROTECTED]> > wrote: > > > I would expect that to happen by default. Replacing a panel should create > a > > new page version which should change the Page URL. Are you using AJAX? > > > > Thomas > > > > On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole <[EMAIL PROTECTED]> > > wrote: > > > > > Hello, > > > > > > I am implementing navigation through my application by switching > panels. > > > > > > When the user presses the back button, I'd like to show the previously > > > displayed panel. Is this possible? > > > > > > Thanks, > > > Cristi Manole > > > > > >
Re: Panel switching and back button
yes, with Ajax On Thu, Jun 26, 2008 at 2:15 PM, Thomas Mäder <[EMAIL PROTECTED]> wrote: > I would expect that to happen by default. Replacing a panel should create a > new page version which should change the Page URL. Are you using AJAX? > > Thomas > > On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole <[EMAIL PROTECTED]> > wrote: > > > Hello, > > > > I am implementing navigation through my application by switching panels. > > > > When the user presses the back button, I'd like to show the previously > > displayed panel. Is this possible? > > > > Thanks, > > Cristi Manole > > >
Re: Panel switching and back button
I would expect that to happen by default. Replacing a panel should create a new page version which should change the Page URL. Are you using AJAX? Thomas On Thu, Jun 26, 2008 at 10:07 AM, Cristi Manole <[EMAIL PROTECTED]> wrote: > Hello, > > I am implementing navigation through my application by switching panels. > > When the user presses the back button, I'd like to show the previously > displayed panel. Is this possible? > > Thanks, > Cristi Manole >
Panel switching and back button
Hello, I am implementing navigation through my application by switching panels. When the user presses the back button, I'd like to show the previously displayed panel. Is this possible? Thanks, Cristi Manole