Re: [Wicket-user] Modal Window and Page Expired - SOLVED

2007-07-20 Thread Laurent Brucher
Ok, my bad...
Cutting out the details, the page that included a ref to the modal window
had a piece of javascript, which generated an IMG tag with a src attribute
starting with a '#' (this is some code ported from a JSF version of the
application). The browser was then trying to fetch the page again looking
for the (inexistent) bookmark, hence the double hit to the page.
 
Now, I'm wondering if it is normal that the framework evicts the page when
removing one of the 2 versions of that page from the access stack since the
other version is still there and may be referenced again. But I don't know
wicket enough to make a valid statement on this.
 
Many thanks for the helps here and there though.
Laurent.
 
 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Laurent
Brucher
Sent: vendredi 13 juillet 2007 22:42
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Modal Window and Page Expired.


Hi all,
 
There was a post last December about the same problem that I'm facing right
now, which is getting a page expired error page after I close a modal
window.
The post was called Firefox and ModalWindow and seemed to talk about the
issue for FF only.
I've encountered the problem first with FF (2.0.0.4). After reading the
post, I tried with IE7 and it worked ok (that was this afternoon).
This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
stuff don't change a thing.
Oh, and of course, the Ajax ModalWindow example works just fine (my code is
heavily inspired from that example)...
I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
 
Have you guys shed any light on this issue at all?
I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
really figure out what's going on...
 
Anything I can do to help address this?
Below is the code I use, just in case.
 
Reagrds,
Laurent.
 
 
// Page containing the modal window
public class MainPage extends WebPage {
public MainPage()
{
...
add( new PreferredStationsDialog(prefStationsDialog) );
...
}
}
 
// The modal window impl.
public class PreferredStationsDialog extends ModalWindow {
public PreferredStationsDialog(String id)
{
super(id);
 
setTitle(xyz);
setCookieName(prefStationsDialog);
setPageMapName(prefStationsDialogPageMap);
setPageCreator( new ModalWindow.PageCreator() {
@Override
public Page createPage() {
return new
PreferredStationsDialogPage(PreferredStationsDialog.this);
}
});
 
setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
return true;
}
});
}
}
 
// The content of the modal window, as a Page
public class PreferredStationsDialogPage extends WebPage
{
public PreferredStationsDialogPage( final PreferredStationsDialog dialog
)
{
super();
 
add( new AjaxLink(button.save) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Save)) );
 
add( new AjaxLink(button.cancel) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Cancel)) );
}
}
 
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Modal Window and Page Expired - SOLVED

2007-07-20 Thread Igor Vaynberg
On 7/19/07, Laurent Brucher [EMAIL PROTECTED] wrote:

 Ok, my bad...
 Cutting out the details, the page that included a ref to the modal window
 had a piece of javascript, which generated an IMG tag with a src
 attribute
 starting with a '#' (this is some code ported from a JSF version of the
 application). The browser was then trying to fetch the page again looking
 for the (inexistent) bookmark, hence the double hit to the page.

 Now, I'm wondering if it is normal that the framework evicts the page when
 removing one of the 2 versions of that page from the access stack since
 the
 other version is still there and may be referenced again. But I don't know
 wicket enough to make a valid statement on this.


well, the idea here is that we can evict it because it is no longer
reachable via the browser. for example you go to page A then go to page B,
then click back and go to page C. you can no longer access page B via the
browser, so wicket evicts it from pagemap since at that point its just
wasting space. however when you have the kinds of problems you have it
becomes a pita to figure out whats going on.

-igor





Many thanks for the helps here and there though.
 Laurent.



   _

 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Laurent
 Brucher
 Sent: vendredi 13 juillet 2007 22:42
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] Modal Window and Page Expired.


 Hi all,

 There was a post last December about the same problem that I'm facing
 right
 now, which is getting a page expired error page after I close a modal
 window.
 The post was called Firefox and ModalWindow and seemed to talk about the
 issue for FF only.
 I've encountered the problem first with FF (2.0.0.4). After reading the
 post, I tried with IE7 and it worked ok (that was this afternoon).
 This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
 stuff don't change a thing.
 Oh, and of course, the Ajax ModalWindow example works just fine (my code
 is
 heavily inspired from that example)...
 I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.

 Have you guys shed any light on this issue at all?
 I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
 really figure out what's going on...

 Anything I can do to help address this?
 Below is the code I use, just in case.

 Reagrds,
 Laurent.


 // Page containing the modal window
 public class MainPage extends WebPage {
 public MainPage()
 {
 ...
 add( new PreferredStationsDialog(prefStationsDialog) );
 ...
 }
 }

 // The modal window impl.
 public class PreferredStationsDialog extends ModalWindow {
 public PreferredStationsDialog(String id)
 {
 super(id);

 setTitle(xyz);
 setCookieName(prefStationsDialog);
 setPageMapName(prefStationsDialogPageMap);
 setPageCreator( new ModalWindow.PageCreator() {
 @Override
 public Page createPage() {
 return new
 PreferredStationsDialogPage(PreferredStationsDialog.this);
 }
 });

 setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
 public boolean onCloseButtonClicked(AjaxRequestTarget target)
 {
 return true;
 }
 });
 }
 }

 // The content of the modal window, as a Page
 public class PreferredStationsDialogPage extends WebPage
 {
 public PreferredStationsDialogPage( final PreferredStationsDialog
 dialog
 )
 {
 super();

 add( new AjaxLink(button.save) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 dialog.close(target);
 }
 }.add( new Label(text, Save)) );

 add( new AjaxLink(button.cancel) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 dialog.close(target);
 }
 }.add( new Label(text, Cancel)) );
 }
 }

 -
 This SF.net email is sponsored by: Microsoft
 Defy all challenges. Microsoft(R) Visual Studio 2005.
 http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Modal Window and Page Expired - SOLVED

2007-07-20 Thread Matej Knopp
Problem is that we evict it also on refresh. But then you still can go
to the page B. Anyway, there are more problems then this with
HttpSessionStore. I think that upgrade to 1.3 is really recommended,
as the default SecondLevelCacheSessionStore doesn't suffer from this
problem any more.

-Matej

On 7/20/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 On 7/19/07, Laurent Brucher [EMAIL PROTECTED] wrote:
 
  Ok, my bad...
  Cutting out the details, the page that included a ref to the modal window
  had a piece of javascript, which generated an IMG tag with a src
  attribute
  starting with a '#' (this is some code ported from a JSF version of the
  application). The browser was then trying to fetch the page again looking
  for the (inexistent) bookmark, hence the double hit to the page.
 
  Now, I'm wondering if it is normal that the framework evicts the page when
  removing one of the 2 versions of that page from the access stack since
  the
  other version is still there and may be referenced again. But I don't know
  wicket enough to make a valid statement on this.


 well, the idea here is that we can evict it because it is no longer
 reachable via the browser. for example you go to page A then go to page B,
 then click back and go to page C. you can no longer access page B via the
 browser, so wicket evicts it from pagemap since at that point its just
 wasting space. however when you have the kinds of problems you have it
 becomes a pita to figure out whats going on.

 -igor





 Many thanks for the helps here and there though.
  Laurent.
 
 
 
_
 
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Laurent
  Brucher
  Sent: vendredi 13 juillet 2007 22:42
  To: wicket-user@lists.sourceforge.net
  Subject: [Wicket-user] Modal Window and Page Expired.
 
 
  Hi all,
 
  There was a post last December about the same problem that I'm facing
  right
  now, which is getting a page expired error page after I close a modal
  window.
  The post was called Firefox and ModalWindow and seemed to talk about the
  issue for FF only.
  I've encountered the problem first with FF (2.0.0.4). After reading the
  post, I tried with IE7 and it worked ok (that was this afternoon).
  This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
  stuff don't change a thing.
  Oh, and of course, the Ajax ModalWindow example works just fine (my code
  is
  heavily inspired from that example)...
  I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
 
  Have you guys shed any light on this issue at all?
  I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
  really figure out what's going on...
 
  Anything I can do to help address this?
  Below is the code I use, just in case.
 
  Reagrds,
  Laurent.
 
 
  // Page containing the modal window
  public class MainPage extends WebPage {
  public MainPage()
  {
  ...
  add( new PreferredStationsDialog(prefStationsDialog) );
  ...
  }
  }
 
  // The modal window impl.
  public class PreferredStationsDialog extends ModalWindow {
  public PreferredStationsDialog(String id)
  {
  super(id);
 
  setTitle(xyz);
  setCookieName(prefStationsDialog);
  setPageMapName(prefStationsDialogPageMap);
  setPageCreator( new ModalWindow.PageCreator() {
  @Override
  public Page createPage() {
  return new
  PreferredStationsDialogPage(PreferredStationsDialog.this);
  }
  });
 
  setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
  public boolean onCloseButtonClicked(AjaxRequestTarget target)
  {
  return true;
  }
  });
  }
  }
 
  // The content of the modal window, as a Page
  public class PreferredStationsDialogPage extends WebPage
  {
  public PreferredStationsDialogPage( final PreferredStationsDialog
  dialog
  )
  {
  super();
 
  add( new AjaxLink(button.save) {
  @Override
  public void onClick(AjaxRequestTarget target) {
  dialog.close(target);
  }
  }.add( new Label(text, Save)) );
 
  add( new AjaxLink(button.cancel) {
  @Override
  public void onClick(AjaxRequestTarget target) {
  dialog.close(target);
  }
  }.add( new Label(text, Cancel)) );
  }
  }
 
  -
  This SF.net email is sponsored by: Microsoft
  Defy all challenges. Microsoft(R) Visual Studio 2005.
  http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 -
 This SF.net email is sponsored

Re: [Wicket-user] Modal Window and Page Expired.

2007-07-19 Thread Matej Knopp
Five modal windows? At the same time? It might be that you are running
out of pagemaps.

This is very weird, hovewer, seems to be reproducable. Can you post a
quickstart? Also, could you check if this is working with wicket 1.3?

-Matej

On 7/18/07, Laurent Brucher [EMAIL PROTECTED] wrote:
 Cookies have been cleared many times, without any success ;-)

 But I found out what is causing (directly or indirectly) the problem:
 In the page that includes the ajax button that is used to bring up the modal
 window, there is a wicket:head section at the top of the page.
 If I remove this wicket:head section, there is no problem with the modal
 window anymore.

 The page globally looks like:
 html
 head
 ...
 /head
 body
 wicket:head.../wicket:head
 wicket:extend
 
 /wicket:extend
 /body
 /html

 Somehow, I've noticed that including the wicket:head triggers an
 additional HTTP request to the same URL (that is, the URL to display the
 above page).
 Dunno why this is happening but the end result is that the pagemap then
 contains 2 versions for the same page ID.
 Then, when I hit the button that brings up the modal window, the framework
 is trying to access the above page, version 0. This has the effect of
 putting that page's version at the top of the pagemap's access stack
 (PageMap.access() method). By doing this, the version 1 of the page is
 removed from the access stack, but also the page itself (call to
 PageMap.remove(Page)).
 Thus, once the modal window gets closed and the original page needs to be
 rendered, we get a page expired since it was removed from the cache.

 That's as far as I can describe what I've seen  understood tracing the
 code.
 I'm not sure where the problem lies: second request because of the
 wicket:head or incorrectly evicting the page.

 Maybe there is something funky in my own code but I don't see what. Or maybe
 there is an issue here.
 Any input would be helpful at this point.

 Thanks!
 Laurent.



   _

 From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
 Sent: mercredi 18 juillet 2007 8:50
 To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Modal Window and Page Expired.


 On 7/13/07, Laurent Brucher [EMAIL PROTECTED] wrote:

 Hi all,

 There was a post last December about the same problem that I'm facing right
 now, which is getting a page expired error page after I close a modal
 window.
 The post was called Firefox and ModalWindow and seemed to talk about the
 issue for FF only.
 I've encountered the problem first with FF (2.0.0.4). After reading the
 post, I tried with IE7 and it worked ok (that was this afternoon).
 This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
 stuff don't change a thing.
 Oh, and of course, the Ajax ModalWindow example works just fine (my code is
 heavily inspired from that example)...
 I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.

 Have you guys shed any light on this issue at all?
 I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
 really figure out what's going on...

 Anything I can do to help address this?


 i wonder, clear cookies in firefox and try again. i know there was a similar
 problem if you didnt set the cookie name in the modal window using
 setcookiename(), but looks like you did that. still, try clearing the
 cookies.

 -igor





 Below is the code I use, just in case.

 Reagrds,
 Laurent.


 // Page containing the modal window
 public class MainPage extends WebPage {
 public MainPage()
 {
 ...
 add( new PreferredStationsDialog(prefStationsDialog) );
 ...
 }
 }

 // The modal window impl.
 public class PreferredStationsDialog extends ModalWindow {
 public PreferredStationsDialog(String id)
 {
 super(id);

 setTitle(xyz);
 setCookieName(prefStationsDialog);
 setPageMapName(prefStationsDialogPageMap);
 setPageCreator( new ModalWindow.PageCreator() {
 @Override
 public Page createPage() {
 return new
 PreferredStationsDialogPage(PreferredStationsDialog.this);
 }
 });

 setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
 public boolean onCloseButtonClicked(AjaxRequestTarget target) {
 return true;
 }
 });
 }
 }

 // The content of the modal window, as a Page
 public class PreferredStationsDialogPage extends WebPage
 {
 public PreferredStationsDialogPage( final PreferredStationsDialog dialog
 )
 {
 super();

 add( new AjaxLink(button.save) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 dialog.close(target);
 }
 }.add( new Label(text, Save)) );

 add( new AjaxLink(button.cancel ) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 dialog.close(target

Re: [Wicket-user] Modal Window and Page Expired.

2007-07-18 Thread 王磊
I want to descript the context.
Some one write a web application based on wicket.Many pages uses ajax.
I encoutered a strange problem.
After 5 ajax modal windows are poped up.The brower will give me a warming 
dialog to tell me that the current browse page will be closed.Then the page is 
redirected to a login page.Sure ,this means the session is out.

I tries someway:
1 Clear the IE cookies.
2 Clear the tomcat workdir
3 force the tomcat use url-rewrite mode.
4 close the IE cookies.

Then the application works fine.
Maybe you need close the browse cookie and use tomcat url-rewrite both.
Try it.



 - Original Message - 
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
 Sent: Wednesday, July 18, 2007 2:49 PM
 Subject: Re: [Wicket-user] Modal Window and Page Expired.
 
 
 On 7/13/07, Laurent Brucher [EMAIL PROTECTED] wrote:

  Hi all,

 There was a post last December about the same problem that I'm facing
 right now, which is getting a page expired error page after I close a modal
 window.
 The post was called Firefox and ModalWindow and seemed to talk about the
 issue for FF only.
 I've encountered the problem first with FF (2.0.0.4). After reading the
 post, I tried with IE7 and it worked ok (that was this afternoon).
 This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
 stuff don't change a thing.
 Oh, and of course, the Ajax ModalWindow example works just fine (my code
 is heavily inspired from that example)...
 I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.

 Have you guys shed any light on this issue at all?
 I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
 really figure out what's going on...

 Anything I can do to help address this?

 
 i wonder, clear cookies in firefox and try again. i know there was a similar
 problem if you didnt set the cookie name in the modal window using
 setcookiename(), but looks like you did that. still, try clearing the
 cookies.
 
 -igor
 
 
 
 
 Below is the code I use, just in case.

 Reagrds,
 Laurent.


 // Page containing the modal window
 public class MainPage extends WebPage {
 public MainPage()
 {
 ...
 add( *new* PreferredStationsDialog(prefStationsDialog) );
 ...
 }
 }

 // The modal window impl.
 public class PreferredStationsDialog extends ModalWindow {
 *public* PreferredStationsDialog(String id)
 {
 *super*(id);

 setTitle(xyz);
 setCookieName(prefStationsDialog);
 setPageMapName(prefStationsDialogPageMap);
 setPageCreator( *new* ModalWindow.PageCreator() {
 @Override
 *public* Page createPage() {
 *return* 
 *new*PreferredStationsDialogPage(PreferredStationsDialog.
 *this*);
 }
 });

 setCloseButtonCallback(*new* ModalWindow.CloseButtonCallback() {
 *public* *boolean* onCloseButtonClicked(AjaxRequestTarget
 target) {
 *return* *true*;
 }
 });
 }
 }

 // The content of the modal window, as a Page
 public class PreferredStationsDialogPage extends WebPage
 {
 *public* PreferredStationsDialogPage( *final* PreferredStationsDialog
 dialog )
 {
 *super*();

 add( *new* AjaxLink(button.save) {
 @Override
 *public* *void* onClick(AjaxRequestTarget target) {
 dialog.*close*(target);
 }
 }.add( *new* Label(text, Save)) );

 add( *new* AjaxLink(button.cancel) {
 @Override
 *public* *void* onClick(AjaxRequestTarget target) {
 dialog.*close*(target);
 }
 }.add( *new* Label(text, Cancel)) );
 }
 }


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2

Re: [Wicket-user] Modal Window and Page Expired.

2007-07-18 Thread Laurent Brucher
Cookies have been cleared many times, without any success ;-)
 
But I found out what is causing (directly or indirectly) the problem:
In the page that includes the ajax button that is used to bring up the modal
window, there is a wicket:head section at the top of the page.
If I remove this wicket:head section, there is no problem with the modal
window anymore.
 
The page globally looks like:
html
head
...
/head
body
wicket:head.../wicket:head
wicket:extend

/wicket:extend
/body
/html
 
Somehow, I've noticed that including the wicket:head triggers an
additional HTTP request to the same URL (that is, the URL to display the
above page).
Dunno why this is happening but the end result is that the pagemap then
contains 2 versions for the same page ID.
Then, when I hit the button that brings up the modal window, the framework
is trying to access the above page, version 0. This has the effect of
putting that page's version at the top of the pagemap's access stack
(PageMap.access() method). By doing this, the version 1 of the page is
removed from the access stack, but also the page itself (call to
PageMap.remove(Page)).
Thus, once the modal window gets closed and the original page needs to be
rendered, we get a page expired since it was removed from the cache.
 
That's as far as I can describe what I've seen  understood tracing the
code.
I'm not sure where the problem lies: second request because of the
wicket:head or incorrectly evicting the page.
 
Maybe there is something funky in my own code but I don't see what. Or maybe
there is an issue here.
Any input would be helpful at this point.
 
Thanks!
Laurent.
 


  _  

From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: mercredi 18 juillet 2007 8:50
To: [EMAIL PROTECTED]; wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Modal Window and Page Expired.


On 7/13/07, Laurent Brucher [EMAIL PROTECTED] wrote: 

Hi all,
 
There was a post last December about the same problem that I'm facing right
now, which is getting a page expired error page after I close a modal
window.
The post was called Firefox and ModalWindow and seemed to talk about the
issue for FF only.
I've encountered the problem first with FF (2.0.0.4). After reading the
post, I tried with IE7 and it worked ok (that was this afternoon).
This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
stuff don't change a thing.
Oh, and of course, the Ajax ModalWindow example works just fine (my code is
heavily inspired from that example)...
I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
 
Have you guys shed any light on this issue at all?
I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
really figure out what's going on...
 
Anything I can do to help address this?


i wonder, clear cookies in firefox and try again. i know there was a similar
problem if you didnt set the cookie name in the modal window using
setcookiename(), but looks like you did that. still, try clearing the
cookies. 

-igor


 


Below is the code I use, just in case.
 
Reagrds,
Laurent.
 
 
// Page containing the modal window
public class MainPage extends WebPage {
public MainPage()
{
...
add( new PreferredStationsDialog(prefStationsDialog) ); 
...
}
}
 
// The modal window impl.
public class PreferredStationsDialog extends ModalWindow {
public PreferredStationsDialog(String id)
{
super(id);
 
setTitle(xyz);
setCookieName(prefStationsDialog);
setPageMapName(prefStationsDialogPageMap);
setPageCreator( new ModalWindow.PageCreator() {
@Override
public Page createPage() {
return new
PreferredStationsDialogPage(PreferredStationsDialog.this);
}
});
 
setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
return true;
}
});
}
}
 
// The content of the modal window, as a Page
public class PreferredStationsDialogPage extends WebPage
{
public PreferredStationsDialogPage( final PreferredStationsDialog dialog
)
{
super();
 
add( new AjaxLink(button.save) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Save)) );
 
add( new AjaxLink(button.cancel ) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Cancel)) );
}
}
 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now. 
http://sourceforge.net/powerbar/db2

[Wicket-user] Modal Window and Page Expired.

2007-07-13 Thread Laurent Brucher
Hi all,
 
There was a post last December about the same problem that I'm facing right
now, which is getting a page expired error page after I close a modal
window.
The post was called Firefox and ModalWindow and seemed to talk about the
issue for FF only.
I've encountered the problem first with FF (2.0.0.4). After reading the
post, I tried with IE7 and it worked ok (that was this afternoon).
This evening, neither IE7 or FF work anymore. Darn! Clearing cookies and
stuff don't change a thing.
Oh, and of course, the Ajax ModalWindow example works just fine (my code is
heavily inspired from that example)...
I'm using Wicket 1.2.6, Tomcat 5.5.20, Jdk1.6u2.
 
Have you guys shed any light on this issue at all?
I've tried to trace the code, but as I'm rather new to Wicket, I couldn't
really figure out what's going on...
 
Anything I can do to help address this?
Below is the code I use, just in case.
 
Reagrds,
Laurent.
 
 
// Page containing the modal window
public class MainPage extends WebPage {
public MainPage()
{
...
add( new PreferredStationsDialog(prefStationsDialog) );
...
}
}
 
// The modal window impl.
public class PreferredStationsDialog extends ModalWindow {
public PreferredStationsDialog(String id)
{
super(id);
 
setTitle(xyz);
setCookieName(prefStationsDialog);
setPageMapName(prefStationsDialogPageMap);
setPageCreator( new ModalWindow.PageCreator() {
@Override
public Page createPage() {
return new
PreferredStationsDialogPage(PreferredStationsDialog.this);
}
});
 
setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
public boolean onCloseButtonClicked(AjaxRequestTarget target) {
return true;
}
});
}
}
 
// The content of the modal window, as a Page
public class PreferredStationsDialogPage extends WebPage
{
public PreferredStationsDialogPage( final PreferredStationsDialog dialog
)
{
super();
 
add( new AjaxLink(button.save) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Save)) );
 
add( new AjaxLink(button.cancel) {
@Override
public void onClick(AjaxRequestTarget target) {
dialog.close(target);
}
}.add( new Label(text, Cancel)) );
}
}
 
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user