Re: Modal Window not opening the second time

2008-04-29 Thread Johan Compagner
We reuse the dialog constantly, so i dont know what goes wrong for
you. What does the javascript debug window tell you?
Maybe the modal window some things that is is still shown

On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:

 Hello,
 Thanks for the reply.
 But isn't it possible to reuse the modalwindow? Because in my application
 the window needs to be opened many times, and I thought it would be better
 to reuse the same window multiple times. Or has that no affect to the
 memory-usage?


 Cristi Manole wrote:
 
  I am 99% certain that if you change your code from :
 
  *final MyChooser myChooser = new MyChooser(modal);*
  *modal.setPageCreator(new ModalWindow.PageCreator() {
   public Page createPage() {
 return myChooser;
 }
  }
  *
  to this :
 
  *modal.setPageCreator(new ModalWindow.PageCreator() {
   public Page createPage() {
 return new MyChooser(modal);
 }
  }
  *
  it will work.
 
  Try it.
  Cristi Manole
 
  On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED] wrote:
 
 
  Hello,
 
  can't anyone help me with this problem?
  If I need to code it differently, please tell me.
  Thanks !!
 
 
  Marieke Vandamme wrote:
  
   Hello,
  
   i'm having problems with the modal window. It shows up fine when I
  click
   my link the first time, but after closing the window with the 'X', it
   won't open again.
   I don't know if I'm using it wrong or if it's a bug.
   Any help is welcome ! thanks. Marieke.
  
   My code :
   public class TestModalWindow extends WebPage {
  
   public TestModalWindow() {
   final ModalWindow modal = new ModalWindow(dataChooser);
   add(modal);
   final MyChooser myChooser = new MyChooser(modal);
   modal.setPageCreator(new ModalWindow.PageCreator() {
  
   public Page createPage() {
   return myChooser;
   }
   });
  
add(new AjaxLink(lnkOpen) {
  
   public void onClick(AjaxRequestTarget target) {
   myChooser.reload(target);
   }
   });
   }
  
   public class MyChooser extends WebPage {
  
   private ModalWindow window;
  
   public MyChooser(ModalWindow w) {
   this.window = w;
   }
  
   public void reload(AjaxRequestTarget target) {
   this.window.show(target);
   }
   }
   }
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window not opening the second time

2008-04-29 Thread Cristi Manole
 that no affect to the
  memory-usage?
 
 
  Cristi Manole wrote:
  
   I am 99% certain that if you change your code from :
  
   *final MyChooser myChooser = new MyChooser(modal);*
   *modal.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
  return myChooser;
  }
   }
   *
   to this :
  
   *modal.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
  return new MyChooser(modal);
  }
   }
   *
   it will work.
  
   Try it.
   Cristi Manole
  
   On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
 wrote:
  
  
   Hello,
  
   can't anyone help me with this problem?
   If I need to code it differently, please tell me.
   Thanks !!
  
  
   Marieke Vandamme wrote:
   
Hello,
   
i'm having problems with the modal window. It shows up fine when I
   click
my link the first time, but after closing the window with the 'X',
 it
won't open again.
I don't know if I'm using it wrong or if it's a bug.
Any help is welcome ! thanks. Marieke.
   
My code :
public class TestModalWindow extends WebPage {
   
public TestModalWindow() {
final ModalWindow modal = new ModalWindow(dataChooser);
add(modal);
final MyChooser myChooser = new MyChooser(modal);
modal.setPageCreator(new ModalWindow.PageCreator() {
   
public Page createPage() {
return myChooser;
}
});
   
 add(new AjaxLink(lnkOpen) {
   
public void onClick(AjaxRequestTarget target) {
myChooser.reload(target);
}
});
}
   
public class MyChooser extends WebPage {
   
private ModalWindow window;
   
public MyChooser(ModalWindow w) {
this.window = w;
}
   
public void reload(AjaxRequestTarget target) {
this.window.show(target);
}
}
}
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Modal Window not opening the second time

2008-04-29 Thread Marieke Vandamme

The javascript debug window is printing no error. 
The server returns an empty response (?xml version=1.0
encoding=UTF-8?ajax-response/ajax-response)
I did some debugging and came to the function in ModalWindow
public void show(AjaxRequestTarget target)
there the boolean shown is tested. The content is only showed when
shown=false, in my case shown=true...

Can you please try the code from my first post? If you say you reuse the
dialog, what am I doing wrong? How do you guys do it? 
Thanks !


Johan Compagner wrote:
 
 We reuse the dialog constantly, so i dont know what goes wrong for
 you. What does the javascript debug window tell you?
 Maybe the modal window some things that is is still shown
 
 On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:

 Hello,
 Thanks for the reply.
 But isn't it possible to reuse the modalwindow? Because in my application
 the window needs to be opened many times, and I thought it would be
 better
 to reuse the same window multiple times. Or has that no affect to the
 memory-usage?


 Cristi Manole wrote:
 
  I am 99% certain that if you change your code from :
 
  *final MyChooser myChooser = new MyChooser(modal);*
  *modal.setPageCreator(new ModalWindow.PageCreator() {
   public Page createPage() {
 return myChooser;
 }
  }
  *
  to this :
 
  *modal.setPageCreator(new ModalWindow.PageCreator() {
   public Page createPage() {
 return new MyChooser(modal);
 }
  }
  *
  it will work.
 
  Try it.
  Cristi Manole
 
  On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED] 
  wrote:
 
 
  Hello,
 
  can't anyone help me with this problem?
  If I need to code it differently, please tell me.
  Thanks !!
 
 
  Marieke Vandamme wrote:
  
   Hello,
  
   i'm having problems with the modal window. It shows up fine when I
  click
   my link the first time, but after closing the window with the 'X',
 it
   won't open again.
   I don't know if I'm using it wrong or if it's a bug.
   Any help is welcome ! thanks. Marieke.
  
   My code :
   public class TestModalWindow extends WebPage {
  
   public TestModalWindow() {
   final ModalWindow modal = new ModalWindow(dataChooser);
   add(modal);
   final MyChooser myChooser = new MyChooser(modal);
   modal.setPageCreator(new ModalWindow.PageCreator() {
  
   public Page createPage() {
   return myChooser;
   }
   });
  
add(new AjaxLink(lnkOpen) {
  
   public void onClick(AjaxRequestTarget target) {
   myChooser.reload(target);
   }
   });
   }
  
   public class MyChooser extends WebPage {
  
   private ModalWindow window;
  
   public MyChooser(ModalWindow w) {
   this.window = w;
   }
  
   public void reload(AjaxRequestTarget target) {
   this.window.show(target);
   }
   }
   }
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16955484.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window not opening the second time

2008-04-29 Thread Nino Saturnino Martinez Vazquez Wael

Im doing it like this:


   AjaxLink popupLink = new AjaxLink(manageWeightPop) {
   @Override
   public void onClick(AjaxRequestTarget target) {
   target
   modalWindow.setTitle(getString(weightlog));
   modalWindow.setMinimalHeight(700);
   modalWindow.setContent(new ManageWeightPanel(modalWindow
   .getContentId(), modalWindow,
   new BaseEntityDetachableModel(getPerson(;
   modalWindow.show(target);

   }
   };


Marieke Vandamme wrote:
The javascript debug window is printing no error. 
The server returns an empty response (?xml version=1.0

encoding=UTF-8?ajax-response/ajax-response)
I did some debugging and came to the function in ModalWindow
public void show(AjaxRequestTarget target)
there the boolean shown is tested. The content is only showed when
shown=false, in my case shown=true...

Can you please try the code from my first post? If you say you reuse the
dialog, what am I doing wrong? How do you guys do it? 
Thanks !



Johan Compagner wrote:
  

We reuse the dialog constantly, so i dont know what goes wrong for
you. What does the javascript debug window tell you?
Maybe the modal window some things that is is still shown

On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:


Hello,
Thanks for the reply.
But isn't it possible to reuse the modalwindow? Because in my application
the window needs to be opened many times, and I thought it would be
better
to reuse the same window multiple times. Or has that no affect to the
memory-usage?


Cristi Manole wrote:
  

I am 99% certain that if you change your code from :

*final MyChooser myChooser = new MyChooser(modal);*
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return myChooser;
   }
}
*
to this :

*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return new MyChooser(modal);
   }
}
*
it will work.

Try it.
Cristi Manole

On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED] wrote:



Hello,

can't anyone help me with this problem?
If I need to code it differently, please tell me.
Thanks !!


Marieke Vandamme wrote:
  

Hello,

i'm having problems with the modal window. It shows up fine when I


click
  

my link the first time, but after closing the window with the 'X',


it
  

won't open again.
I don't know if I'm using it wrong or if it's a bug.
Any help is welcome ! thanks. Marieke.

My code :
public class TestModalWindow extends WebPage {

public TestModalWindow() {
final ModalWindow modal = new ModalWindow(dataChooser);
add(modal);
final MyChooser myChooser = new MyChooser(modal);
modal.setPageCreator(new ModalWindow.PageCreator() {

public Page createPage() {
return myChooser;
}
});

 add(new AjaxLink(lnkOpen) {

public void onClick(AjaxRequestTarget target) {
myChooser.reload(target);
}
});
}

public class MyChooser extends WebPage {

private ModalWindow window;

public MyChooser(ModalWindow w) {
this.window = w;
}

public void reload(AjaxRequestTarget target) {
this.window.show(target);
}
}
}



--
View this message in context:

  

http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
  

Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
View this message in context:
http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window not opening the second time

2008-04-29 Thread Cristi Manole
Exactly, you always create a new panel for content. Can you reuse the
ManageWeightPanel object?

Cristi Manole

On Tue, Apr 29, 2008 at 11:24 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

 Im doing it like this:


   AjaxLink popupLink = new AjaxLink(manageWeightPop) {
   @Override
   public void onClick(AjaxRequestTarget target) {
   target
   modalWindow.setTitle(getString(weightlog));
   modalWindow.setMinimalHeight(700);
   modalWindow.setContent(new ManageWeightPanel(modalWindow
   .getContentId(), modalWindow,
   new BaseEntityDetachableModel(getPerson(;
   modalWindow.show(target);

   }
   };



 Marieke Vandamme wrote:

  The javascript debug window is printing no error. The server returns an
  empty response (?xml version=1.0
  encoding=UTF-8?ajax-response/ajax-response)
  I did some debugging and came to the function in ModalWindow
  public void show(AjaxRequestTarget target)
  there the boolean shown is tested. The content is only showed when
  shown=false, in my case shown=true...
 
  Can you please try the code from my first post? If you say you reuse the
  dialog, what am I doing wrong? How do you guys do it? Thanks !
 
 
  Johan Compagner wrote:
 
 
   We reuse the dialog constantly, so i dont know what goes wrong for
   you. What does the javascript debug window tell you?
   Maybe the modal window some things that is is still shown
  
   On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:
  
  
Hello,
Thanks for the reply.
But isn't it possible to reuse the modalwindow? Because in my
application
the window needs to be opened many times, and I thought it would be
better
to reuse the same window multiple times. Or has that no affect to
the
memory-usage?
   
   
Cristi Manole wrote:
   
   
 I am 99% certain that if you change your code from :

 *final MyChooser myChooser = new MyChooser(modal);*
 *modal.setPageCreator(new ModalWindow.PageCreator() {
  public Page createPage() {
   return myChooser;
   }
 }
 *
 to this :

 *modal.setPageCreator(new ModalWindow.PageCreator() {
  public Page createPage() {
   return new MyChooser(modal);
   }
 }
 *
 it will work.

 Try it.
 Cristi Manole

 On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
 wrote:



  Hello,
 
  can't anyone help me with this problem?
  If I need to code it differently, please tell me.
  Thanks !!
 
 
  Marieke Vandamme wrote:
 
 
   Hello,
  
   i'm having problems with the modal window. It shows up fine
   when I
  
  
  click
 
 
   my link the first time, but after closing the window with the
   'X',
  
  
  it
   
   
 won't open again.
   I don't know if I'm using it wrong or if it's a bug.
   Any help is welcome ! thanks. Marieke.
  
   My code :
   public class TestModalWindow extends WebPage {
  
  public TestModalWindow() {
  final ModalWindow modal = new
   ModalWindow(dataChooser);
  add(modal);
  final MyChooser myChooser = new MyChooser(modal);
  modal.setPageCreator(new ModalWindow.PageCreator() {
  
  public Page createPage() {
  return myChooser;
  }
  });
  
   add(new AjaxLink(lnkOpen) {
  
  public void onClick(AjaxRequestTarget target) {
  myChooser.reload(target);
  }
  });
  }
  
  public class MyChooser extends WebPage {
  
  private ModalWindow window;
  
  public MyChooser(ModalWindow w) {
  this.window = w;
  }
  
  public void reload(AjaxRequestTarget target) {
  this.window.show(target);
  }
  }
   }
  
  
  
  --
  View this message in context:
 
 
 

http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
   
   
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


--
View this message in context:
   
http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
Sent from the Wicket - User mailing list archive at Nabble.com

Re: Modal Window not opening the second time

2008-04-29 Thread Marieke Vandamme

You are creating a new instance of your Panel. 
I don't need to create a new ModalWindow or Panel, because all the data on
my ModalWindow is the same.
Your solution works because setContent sets shown = false.
Shouldn't it work without this call to setContent? 


Nino.Martinez wrote:
 
 Im doing it like this:
 
 
 AjaxLink popupLink = new AjaxLink(manageWeightPop) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 target
 modalWindow.setTitle(getString(weightlog));
 modalWindow.setMinimalHeight(700);
 modalWindow.setContent(new ManageWeightPanel(modalWindow
 .getContentId(), modalWindow,
 new BaseEntityDetachableModel(getPerson(;
 modalWindow.show(target);
 
 }
 };
 
 
 Marieke Vandamme wrote:
 The javascript debug window is printing no error. 
 The server returns an empty response (?xml version=1.0
 encoding=UTF-8?ajax-response/ajax-response)
 I did some debugging and came to the function in ModalWindow
 public void show(AjaxRequestTarget target)
 there the boolean shown is tested. The content is only showed when
 shown=false, in my case shown=true...

 Can you please try the code from my first post? If you say you reuse the
 dialog, what am I doing wrong? How do you guys do it? 
 Thanks !


 Johan Compagner wrote:
   
 We reuse the dialog constantly, so i dont know what goes wrong for
 you. What does the javascript debug window tell you?
 Maybe the modal window some things that is is still shown

 On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:
 
 Hello,
 Thanks for the reply.
 But isn't it possible to reuse the modalwindow? Because in my
 application
 the window needs to be opened many times, and I thought it would be
 better
 to reuse the same window multiple times. Or has that no affect to the
 memory-usage?


 Cristi Manole wrote:
   
 I am 99% certain that if you change your code from :

 *final MyChooser myChooser = new MyChooser(modal);*
 *modal.setPageCreator(new ModalWindow.PageCreator() {
  public Page createPage() {
return myChooser;
}
 }
 *
 to this :

 *modal.setPageCreator(new ModalWindow.PageCreator() {
  public Page createPage() {
return new MyChooser(modal);
}
 }
 *
 it will work.

 Try it.
 Cristi Manole

 On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
 wrote:

 
 Hello,

 can't anyone help me with this problem?
 If I need to code it differently, please tell me.
 Thanks !!


 Marieke Vandamme wrote:
   
 Hello,

 i'm having problems with the modal window. It shows up fine when I
 
 click
   
 my link the first time, but after closing the window with the 'X',
 
 it
   
 won't open again.
 I don't know if I'm using it wrong or if it's a bug.
 Any help is welcome ! thanks. Marieke.

 My code :
 public class TestModalWindow extends WebPage {

 public TestModalWindow() {
 final ModalWindow modal = new ModalWindow(dataChooser);
 add(modal);
 final MyChooser myChooser = new MyChooser(modal);
 modal.setPageCreator(new ModalWindow.PageCreator() {

 public Page createPage() {
 return myChooser;
 }
 });

  add(new AjaxLink(lnkOpen) {

 public void onClick(AjaxRequestTarget target) {
 myChooser.reload(target);
 }
 });
 }

 public class MyChooser extends WebPage {

 private ModalWindow window;

 public MyChooser(ModalWindow w) {
 this.window = w;
 }

 public void reload(AjaxRequestTarget target) {
 this.window.show(target);
 }
 }
 }

 
 --
 View this message in context:

   
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
   
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   
 
 --
 View this message in context:
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 

   
 
 -- 
 -Wicket for love
 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684

Re: Modal Window not opening the second time

2008-04-29 Thread Nino Saturnino Martinez Vazquez Wael



Cristi Manole wrote:

Exactly, you always create a new panel for content.

True.

 Can you reuse the
ManageWeightPanel object?

  
Probably could. Havent looked into it, since all of the panel needs to 
updated anyhow.

Cristi Manole

On Tue, Apr 29, 2008 at 11:24 AM, Nino Saturnino Martinez Vazquez Wael 
[EMAIL PROTECTED] wrote:

  

Im doing it like this:


  AjaxLink popupLink = new AjaxLink(manageWeightPop) {
  @Override
  public void onClick(AjaxRequestTarget target) {
  target
  modalWindow.setTitle(getString(weightlog));
  modalWindow.setMinimalHeight(700);
  modalWindow.setContent(new ManageWeightPanel(modalWindow
  .getContentId(), modalWindow,
  new BaseEntityDetachableModel(getPerson(;
  modalWindow.show(target);

  }
  };



Marieke Vandamme wrote:



The javascript debug window is printing no error. The server returns an
empty response (?xml version=1.0
encoding=UTF-8?ajax-response/ajax-response)
I did some debugging and came to the function in ModalWindow
public void show(AjaxRequestTarget target)
there the boolean shown is tested. The content is only showed when
shown=false, in my case shown=true...

Can you please try the code from my first post? If you say you reuse the
dialog, what am I doing wrong? How do you guys do it? Thanks !


Johan Compagner wrote:


  

We reuse the dialog constantly, so i dont know what goes wrong for
you. What does the javascript debug window tell you?
Maybe the modal window some things that is is still shown

On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:




Hello,
Thanks for the reply.
But isn't it possible to reuse the modalwindow? Because in my
application
the window needs to be opened many times, and I thought it would be
better
to reuse the same window multiple times. Or has that no affect to
the
memory-usage?


Cristi Manole wrote:


  

I am 99% certain that if you change your code from :

*final MyChooser myChooser = new MyChooser(modal);*
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
  return myChooser;
  }
}
*
to this :

*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
  return new MyChooser(modal);
  }
}
*
it will work.

Try it.
Cristi Manole

On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
wrote:





Hello,

can't anyone help me with this problem?
If I need to code it differently, please tell me.
Thanks !!


Marieke Vandamme wrote:


  

Hello,

i'm having problems with the modal window. It shows up fine
when I




click


  

my link the first time, but after closing the window with the
'X',




it
  
  

won't open again.


I don't know if I'm using it wrong or if it's a bug.
Any help is welcome ! thanks. Marieke.

My code :
public class TestModalWindow extends WebPage {

   public TestModalWindow() {
   final ModalWindow modal = new
ModalWindow(dataChooser);
   add(modal);
   final MyChooser myChooser = new MyChooser(modal);
   modal.setPageCreator(new ModalWindow.PageCreator() {

   public Page createPage() {
   return myChooser;
   }
   });

add(new AjaxLink(lnkOpen) {

   public void onClick(AjaxRequestTarget target) {
   myChooser.reload(target);
   }
   });
   }

   public class MyChooser extends WebPage {

   private ModalWindow window;

   public MyChooser(ModalWindow w) {
   this.window = w;
   }

   public void reload(AjaxRequestTarget target) {
   this.window.show(target);
   }
   }
}





--
View this message in context:



  

http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html


  

Sent from the Wicket - User mailing list archive at Nabble.com.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  


--
View this message in context:

http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
Sent from the Wicket - User mailing list archive at Nabble.com.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684

Re: Modal Window not opening the second time

2008-04-29 Thread Johan Compagner
exactly what i thought
somehow your shown boolean stays on true
So the problem is not showing it again
The problem for you is in the closing..
Because the shown boolean should be reverted to false

johan


On Tue, Apr 29, 2008 at 10:21 AM, Marieke Vandamme [EMAIL PROTECTED] wrote:


 The javascript debug window is printing no error.
 The server returns an empty response (?xml version=1.0
 encoding=UTF-8?ajax-response/ajax-response)
 I did some debugging and came to the function in ModalWindow
 public void show(AjaxRequestTarget target)
 there the boolean shown is tested. The content is only showed when
 shown=false, in my case shown=true...

 Can you please try the code from my first post? If you say you reuse the
 dialog, what am I doing wrong? How do you guys do it?
 Thanks !


 Johan Compagner wrote:
 
  We reuse the dialog constantly, so i dont know what goes wrong for
  you. What does the javascript debug window tell you?
  Maybe the modal window some things that is is still shown
 
  On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:
 
  Hello,
  Thanks for the reply.
  But isn't it possible to reuse the modalwindow? Because in my
 application
  the window needs to be opened many times, and I thought it would be
  better
  to reuse the same window multiple times. Or has that no affect to the
  memory-usage?
 
 
  Cristi Manole wrote:
  
   I am 99% certain that if you change your code from :
  
   *final MyChooser myChooser = new MyChooser(modal);*
   *modal.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
  return myChooser;
  }
   }
   *
   to this :
  
   *modal.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
  return new MyChooser(modal);
  }
   }
   *
   it will work.
  
   Try it.
   Cristi Manole
  
   On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
 wrote:
  
  
   Hello,
  
   can't anyone help me with this problem?
   If I need to code it differently, please tell me.
   Thanks !!
  
  
   Marieke Vandamme wrote:
   
Hello,
   
i'm having problems with the modal window. It shows up fine when I
   click
my link the first time, but after closing the window with the 'X',
  it
won't open again.
I don't know if I'm using it wrong or if it's a bug.
Any help is welcome ! thanks. Marieke.
   
My code :
public class TestModalWindow extends WebPage {
   
public TestModalWindow() {
final ModalWindow modal = new ModalWindow(dataChooser);
add(modal);
final MyChooser myChooser = new MyChooser(modal);
modal.setPageCreator(new ModalWindow.PageCreator() {
   
public Page createPage() {
return myChooser;
}
});
   
 add(new AjaxLink(lnkOpen) {
   
public void onClick(AjaxRequestTarget target) {
myChooser.reload(target);
}
});
}
   
public class MyChooser extends WebPage {
   
private ModalWindow window;
   
public MyChooser(ModalWindow w) {
this.window = w;
}
   
public void reload(AjaxRequestTarget target) {
this.window.show(target);
}
}
}
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16955484.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Modal Window not opening the second time

2008-04-29 Thread Nino Saturnino Martinez Vazquez Wael
() {
return myChooser;
}
});

 add(new AjaxLink(lnkOpen) {

public void onClick(AjaxRequestTarget target) {
myChooser.reload(target);
}
});
}

public class MyChooser extends WebPage {

private ModalWindow window;

public MyChooser(ModalWindow w) {
this.window = w;
}

public void reload(AjaxRequestTarget target) {
this.window.show(target);
}
}
}




--
View this message in context:

  
  

http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
  
  

Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  
  



--
View this message in context:
http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  
  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window not opening the second time

2008-04-29 Thread Marieke Vandamme

Sorry, but I don't know what the solution is for me now?
When looking into ModalWindow again :
public void close(AjaxRequestTarget target)
{
getContent().setVisible(false);
target.appendJavascript(getCloseJavacript());
shown = false;
}
When debugging, the shown is set to false. 
But the next time, in the show function, it's true again...

Should I set it somewhere to false myself?


Johan Compagner wrote:
 
 exactly what i thought
 somehow your shown boolean stays on true
 So the problem is not showing it again
 The problem for you is in the closing..
 Because the shown boolean should be reverted to false
 
 johan
 
 
 On Tue, Apr 29, 2008 at 10:21 AM, Marieke Vandamme [EMAIL PROTECTED] wrote:
 

 The javascript debug window is printing no error.
 The server returns an empty response (?xml version=1.0
 encoding=UTF-8?ajax-response/ajax-response)
 I did some debugging and came to the function in ModalWindow
 public void show(AjaxRequestTarget target)
 there the boolean shown is tested. The content is only showed when
 shown=false, in my case shown=true...

 Can you please try the code from my first post? If you say you reuse the
 dialog, what am I doing wrong? How do you guys do it?
 Thanks !


 Johan Compagner wrote:
 
  We reuse the dialog constantly, so i dont know what goes wrong for
  you. What does the javascript debug window tell you?
  Maybe the modal window some things that is is still shown
 
  On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:
 
  Hello,
  Thanks for the reply.
  But isn't it possible to reuse the modalwindow? Because in my
 application
  the window needs to be opened many times, and I thought it would be
  better
  to reuse the same window multiple times. Or has that no affect to the
  memory-usage?
 
 
  Cristi Manole wrote:
  
   I am 99% certain that if you change your code from :
  
   *final MyChooser myChooser = new MyChooser(modal);*
   *modal.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
  return myChooser;
  }
   }
   *
   to this :
  
   *modal.setPageCreator(new ModalWindow.PageCreator() {
public Page createPage() {
  return new MyChooser(modal);
  }
   }
   *
   it will work.
  
   Try it.
   Cristi Manole
  
   On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
 wrote:
  
  
   Hello,
  
   can't anyone help me with this problem?
   If I need to code it differently, please tell me.
   Thanks !!
  
  
   Marieke Vandamme wrote:
   
Hello,
   
i'm having problems with the modal window. It shows up fine when
 I
   click
my link the first time, but after closing the window with the
 'X',
  it
won't open again.
I don't know if I'm using it wrong or if it's a bug.
Any help is welcome ! thanks. Marieke.
   
My code :
public class TestModalWindow extends WebPage {
   
public TestModalWindow() {
final ModalWindow modal = new ModalWindow(dataChooser);
add(modal);
final MyChooser myChooser = new MyChooser(modal);
modal.setPageCreator(new ModalWindow.PageCreator() {
   
public Page createPage() {
return myChooser;
}
});
   
 add(new AjaxLink(lnkOpen) {
   
public void onClick(AjaxRequestTarget target) {
myChooser.reload(target);
}
});
}
   
public class MyChooser extends WebPage {
   
private ModalWindow window;
   
public MyChooser(ModalWindow w) {
this.window = w;
}
   
public void reload(AjaxRequestTarget target) {
this.window.show(target);
}
}
}
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16955484.html
 Sent from the Wicket - User mailing list

Re: Modal Window not opening the second time

2008-04-29 Thread Cristi Manole
I for one think it's a bug somewhere. Not in Marieke's code.

On Tue, Apr 29, 2008 at 12:11 PM, Marieke Vandamme [EMAIL PROTECTED] wrote:


 Sorry, but I don't know what the solution is for me now?
 When looking into ModalWindow again :
 public void close(AjaxRequestTarget target)
{
getContent().setVisible(false);
target.appendJavascript(getCloseJavacript());
shown = false;
}
 When debugging, the shown is set to false.
 But the next time, in the show function, it's true again...

 Should I set it somewhere to false myself?


 Johan Compagner wrote:
 
  exactly what i thought
  somehow your shown boolean stays on true
  So the problem is not showing it again
  The problem for you is in the closing..
  Because the shown boolean should be reverted to false
 
  johan
 
 
  On Tue, Apr 29, 2008 at 10:21 AM, Marieke Vandamme [EMAIL PROTECTED] 
  wrote:
 
 
  The javascript debug window is printing no error.
  The server returns an empty response (?xml version=1.0
  encoding=UTF-8?ajax-response/ajax-response)
  I did some debugging and came to the function in ModalWindow
  public void show(AjaxRequestTarget target)
  there the boolean shown is tested. The content is only showed when
  shown=false, in my case shown=true...
 
  Can you please try the code from my first post? If you say you reuse
 the
  dialog, what am I doing wrong? How do you guys do it?
  Thanks !
 
 
  Johan Compagner wrote:
  
   We reuse the dialog constantly, so i dont know what goes wrong for
   you. What does the javascript debug window tell you?
   Maybe the modal window some things that is is still shown
  
   On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:
  
   Hello,
   Thanks for the reply.
   But isn't it possible to reuse the modalwindow? Because in my
  application
   the window needs to be opened many times, and I thought it would be
   better
   to reuse the same window multiple times. Or has that no affect to
 the
   memory-usage?
  
  
   Cristi Manole wrote:
   
I am 99% certain that if you change your code from :
   
*final MyChooser myChooser = new MyChooser(modal);*
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return myChooser;
   }
}
*
to this :
   
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return new MyChooser(modal);
   }
}
*
it will work.
   
Try it.
Cristi Manole
   
On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
  wrote:
   
   
Hello,
   
can't anyone help me with this problem?
If I need to code it differently, please tell me.
Thanks !!
   
   
Marieke Vandamme wrote:

 Hello,

 i'm having problems with the modal window. It shows up fine
 when
  I
click
 my link the first time, but after closing the window with the
  'X',
   it
 won't open again.
 I don't know if I'm using it wrong or if it's a bug.
 Any help is welcome ! thanks. Marieke.

 My code :
 public class TestModalWindow extends WebPage {

 public TestModalWindow() {
 final ModalWindow modal = new
 ModalWindow(dataChooser);
 add(modal);
 final MyChooser myChooser = new MyChooser(modal);
 modal.setPageCreator(new ModalWindow.PageCreator() {

 public Page createPage() {
 return myChooser;
 }
 });

  add(new AjaxLink(lnkOpen) {

 public void onClick(AjaxRequestTarget target) {
 myChooser.reload(target);
 }
 });
 }

 public class MyChooser extends WebPage {

 private ModalWindow window;

 public MyChooser(ModalWindow w) {
 this.window = w;
 }

 public void reload(AjaxRequestTarget target) {
 this.window.show(target);
 }
 }
 }

   
--
View this message in context:
   
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED

Re: Modal Window not opening the second time

2008-04-29 Thread Johan Compagner
make a test case then and attach it to a jira issue

On Tue, Apr 29, 2008 at 11:11 AM, Marieke Vandamme [EMAIL PROTECTED] wrote:


 Sorry, but I don't know what the solution is for me now?
 When looking into ModalWindow again :
 public void close(AjaxRequestTarget target)
{
getContent().setVisible(false);
target.appendJavascript(getCloseJavacript());
shown = false;
}
 When debugging, the shown is set to false.
 But the next time, in the show function, it's true again...

 Should I set it somewhere to false myself?


 Johan Compagner wrote:
 
  exactly what i thought
  somehow your shown boolean stays on true
  So the problem is not showing it again
  The problem for you is in the closing..
  Because the shown boolean should be reverted to false
 
  johan
 
 
  On Tue, Apr 29, 2008 at 10:21 AM, Marieke Vandamme [EMAIL PROTECTED] 
  wrote:
 
 
  The javascript debug window is printing no error.
  The server returns an empty response (?xml version=1.0
  encoding=UTF-8?ajax-response/ajax-response)
  I did some debugging and came to the function in ModalWindow
  public void show(AjaxRequestTarget target)
  there the boolean shown is tested. The content is only showed when
  shown=false, in my case shown=true...
 
  Can you please try the code from my first post? If you say you reuse
 the
  dialog, what am I doing wrong? How do you guys do it?
  Thanks !
 
 
  Johan Compagner wrote:
  
   We reuse the dialog constantly, so i dont know what goes wrong for
   you. What does the javascript debug window tell you?
   Maybe the modal window some things that is is still shown
  
   On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:
  
   Hello,
   Thanks for the reply.
   But isn't it possible to reuse the modalwindow? Because in my
  application
   the window needs to be opened many times, and I thought it would be
   better
   to reuse the same window multiple times. Or has that no affect to
 the
   memory-usage?
  
  
   Cristi Manole wrote:
   
I am 99% certain that if you change your code from :
   
*final MyChooser myChooser = new MyChooser(modal);*
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return myChooser;
   }
}
*
to this :
   
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return new MyChooser(modal);
   }
}
*
it will work.
   
Try it.
Cristi Manole
   
On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
  wrote:
   
   
Hello,
   
can't anyone help me with this problem?
If I need to code it differently, please tell me.
Thanks !!
   
   
Marieke Vandamme wrote:

 Hello,

 i'm having problems with the modal window. It shows up fine
 when
  I
click
 my link the first time, but after closing the window with the
  'X',
   it
 won't open again.
 I don't know if I'm using it wrong or if it's a bug.
 Any help is welcome ! thanks. Marieke.

 My code :
 public class TestModalWindow extends WebPage {

 public TestModalWindow() {
 final ModalWindow modal = new
 ModalWindow(dataChooser);
 add(modal);
 final MyChooser myChooser = new MyChooser(modal);
 modal.setPageCreator(new ModalWindow.PageCreator() {

 public Page createPage() {
 return myChooser;
 }
 });

  add(new AjaxLink(lnkOpen) {

 public void onClick(AjaxRequestTarget target) {
 myChooser.reload(target);
 }
 });
 }

 public class MyChooser extends WebPage {

 private ModalWindow window;

 public MyChooser(ModalWindow w) {
 this.window = w;
 }

 public void reload(AjaxRequestTarget target) {
 this.window.show(target);
 }
 }
 }

   
--
View this message in context:
   
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED

Re: Modal Window not opening the second time

2008-04-29 Thread Marieke Vandamme

I created a jira issue

https://issues.apache.org/jira/browse/WICKET-1576

Thanks !


Johan Compagner wrote:
 
 make a test case then and attach it to a jira issue
 
 On Tue, Apr 29, 2008 at 11:11 AM, Marieke Vandamme [EMAIL PROTECTED] wrote:
 

 Sorry, but I don't know what the solution is for me now?
 When looking into ModalWindow again :
 public void close(AjaxRequestTarget target)
{
getContent().setVisible(false);
target.appendJavascript(getCloseJavacript());
shown = false;
}
 When debugging, the shown is set to false.
 But the next time, in the show function, it's true again...

 Should I set it somewhere to false myself?


 Johan Compagner wrote:
 
  exactly what i thought
  somehow your shown boolean stays on true
  So the problem is not showing it again
  The problem for you is in the closing..
  Because the shown boolean should be reverted to false
 
  johan
 
 
  On Tue, Apr 29, 2008 at 10:21 AM, Marieke Vandamme [EMAIL PROTECTED]
 wrote:
 
 
  The javascript debug window is printing no error.
  The server returns an empty response (?xml version=1.0
  encoding=UTF-8?ajax-response/ajax-response)
  I did some debugging and came to the function in ModalWindow
  public void show(AjaxRequestTarget target)
  there the boolean shown is tested. The content is only showed when
  shown=false, in my case shown=true...
 
  Can you please try the code from my first post? If you say you reuse
 the
  dialog, what am I doing wrong? How do you guys do it?
  Thanks !
 
 
  Johan Compagner wrote:
  
   We reuse the dialog constantly, so i dont know what goes wrong for
   you. What does the javascript debug window tell you?
   Maybe the modal window some things that is is still shown
  
   On 4/29/08, Marieke Vandamme [EMAIL PROTECTED] wrote:
  
   Hello,
   Thanks for the reply.
   But isn't it possible to reuse the modalwindow? Because in my
  application
   the window needs to be opened many times, and I thought it would be
   better
   to reuse the same window multiple times. Or has that no affect to
 the
   memory-usage?
  
  
   Cristi Manole wrote:
   
I am 99% certain that if you change your code from :
   
*final MyChooser myChooser = new MyChooser(modal);*
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return myChooser;
   }
}
*
to this :
   
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return new MyChooser(modal);
   }
}
*
it will work.
   
Try it.
Cristi Manole
   
On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED]
  wrote:
   
   
Hello,
   
can't anyone help me with this problem?
If I need to code it differently, please tell me.
Thanks !!
   
   
Marieke Vandamme wrote:

 Hello,

 i'm having problems with the modal window. It shows up fine
 when
  I
click
 my link the first time, but after closing the window with the
  'X',
   it
 won't open again.
 I don't know if I'm using it wrong or if it's a bug.
 Any help is welcome ! thanks. Marieke.

 My code :
 public class TestModalWindow extends WebPage {

 public TestModalWindow() {
 final ModalWindow modal = new
 ModalWindow(dataChooser);
 add(modal);
 final MyChooser myChooser = new MyChooser(modal);
 modal.setPageCreator(new ModalWindow.PageCreator() {

 public Page createPage() {
 return myChooser;
 }
 });

  add(new AjaxLink(lnkOpen) {

 public void onClick(AjaxRequestTarget target)
 {
 myChooser.reload(target);
 }
 });
 }

 public class MyChooser extends WebPage {

 private ModalWindow window;

 public MyChooser(ModalWindow w) {
 this.window = w;
 }

 public void reload(AjaxRequestTarget target) {
 this.window.show(target);
 }
 }
 }

   
--
View this message in context:
   
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
Sent from the Wicket - User mailing list archive at Nabble.com.
   
   
   
  -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL

Re: Modal Window not opening the second time

2008-04-28 Thread Marieke Vandamme

Hello, 

can't anyone help me with this problem?
If I need to code it differently, please tell me.
Thanks !!


Marieke Vandamme wrote:
 
 Hello, 
 
 i'm having problems with the modal window. It shows up fine when I click
 my link the first time, but after closing the window with the 'X', it
 won't open again.
 I don't know if I'm using it wrong or if it's a bug. 
 Any help is welcome ! thanks. Marieke.
 
 My code :
 public class TestModalWindow extends WebPage {
 
 public TestModalWindow() {
 final ModalWindow modal = new ModalWindow(dataChooser);
 add(modal);
 final MyChooser myChooser = new MyChooser(modal);
 modal.setPageCreator(new ModalWindow.PageCreator() {
 
 public Page createPage() {
 return myChooser;
 }
 });
 
  add(new AjaxLink(lnkOpen) {
 
 public void onClick(AjaxRequestTarget target) {
 myChooser.reload(target);
 }
 });
 }
 
 public class MyChooser extends WebPage {
 
 private ModalWindow window;
 
 public MyChooser(ModalWindow w) {
 this.window = w;
 }
 
 public void reload(AjaxRequestTarget target) {
 this.window.show(target);
 }
 }
 }
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Modal Window not opening the second time

2008-04-28 Thread Cristi Manole
I am 99% certain that if you change your code from :

*final MyChooser myChooser = new MyChooser(modal);*
*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return myChooser;
   }
}
*
to this :

*modal.setPageCreator(new ModalWindow.PageCreator() {
 public Page createPage() {
   return new MyChooser(modal);
   }
}
*
it will work.

Try it.
Cristi Manole

On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED] wrote:


 Hello,

 can't anyone help me with this problem?
 If I need to code it differently, please tell me.
 Thanks !!


 Marieke Vandamme wrote:
 
  Hello,
 
  i'm having problems with the modal window. It shows up fine when I click
  my link the first time, but after closing the window with the 'X', it
  won't open again.
  I don't know if I'm using it wrong or if it's a bug.
  Any help is welcome ! thanks. Marieke.
 
  My code :
  public class TestModalWindow extends WebPage {
 
  public TestModalWindow() {
  final ModalWindow modal = new ModalWindow(dataChooser);
  add(modal);
  final MyChooser myChooser = new MyChooser(modal);
  modal.setPageCreator(new ModalWindow.PageCreator() {
 
  public Page createPage() {
  return myChooser;
  }
  });
 
   add(new AjaxLink(lnkOpen) {
 
  public void onClick(AjaxRequestTarget target) {
  myChooser.reload(target);
  }
  });
  }
 
  public class MyChooser extends WebPage {
 
  private ModalWindow window;
 
  public MyChooser(ModalWindow w) {
  this.window = w;
  }
 
  public void reload(AjaxRequestTarget target) {
  this.window.show(target);
  }
  }
  }
 

 --
 View this message in context:
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Modal Window not opening the second time

2008-04-28 Thread Marieke Vandamme

Hello, 
Thanks for the reply. 
But isn't it possible to reuse the modalwindow? Because in my application
the window needs to be opened many times, and I thought it would be better
to reuse the same window multiple times. Or has that no affect to the
memory-usage?


Cristi Manole wrote:
 
 I am 99% certain that if you change your code from :
 
 *final MyChooser myChooser = new MyChooser(modal);*
 *modal.setPageCreator(new ModalWindow.PageCreator() {
  public Page createPage() {
return myChooser;
}
 }
 *
 to this :
 
 *modal.setPageCreator(new ModalWindow.PageCreator() {
  public Page createPage() {
return new MyChooser(modal);
}
 }
 *
 it will work.
 
 Try it.
 Cristi Manole
 
 On Mon, Apr 28, 2008 at 1:07 PM, Marieke Vandamme [EMAIL PROTECTED] wrote:
 

 Hello,

 can't anyone help me with this problem?
 If I need to code it differently, please tell me.
 Thanks !!


 Marieke Vandamme wrote:
 
  Hello,
 
  i'm having problems with the modal window. It shows up fine when I
 click
  my link the first time, but after closing the window with the 'X', it
  won't open again.
  I don't know if I'm using it wrong or if it's a bug.
  Any help is welcome ! thanks. Marieke.
 
  My code :
  public class TestModalWindow extends WebPage {
 
  public TestModalWindow() {
  final ModalWindow modal = new ModalWindow(dataChooser);
  add(modal);
  final MyChooser myChooser = new MyChooser(modal);
  modal.setPageCreator(new ModalWindow.PageCreator() {
 
  public Page createPage() {
  return myChooser;
  }
  });
 
   add(new AjaxLink(lnkOpen) {
 
  public void onClick(AjaxRequestTarget target) {
  myChooser.reload(target);
  }
  });
  }
 
  public class MyChooser extends WebPage {
 
  private ModalWindow window;
 
  public MyChooser(ModalWindow w) {
  this.window = w;
  }
 
  public void reload(AjaxRequestTarget target) {
  this.window.show(target);
  }
  }
  }
 

 --
 View this message in context:
 http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16935903.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16953499.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Modal Window not opening the second time

2008-04-24 Thread Marieke Vandamme

Hello, 

i'm having problems with the modal window. It shows up fine when I click my
link the first time, but after closing the window with the 'X', it won't
open again.
I don't know if I'm using it wrong or if it's a bug. 
Any help is welcome ! thanks. Marieke.

My code :
public class TestModalWindow extends WebPage {

public TestModalWindow() {
final ModalWindow modal = new ModalWindow(dataChooser);
add(modal);
final MyChooser myChooser = new MyChooser(modal);
modal.setPageCreator(new ModalWindow.PageCreator() {

public Page createPage() {
return myChooser;
}
});

 add(new AjaxLink(lnkOpen) {

public void onClick(AjaxRequestTarget target) {
myChooser.reload(target);
}
});
}

public class MyChooser extends WebPage {

private ModalWindow window;

public MyChooser(ModalWindow w) {
this.window = w;
}

public void reload(AjaxRequestTarget target) {
this.window.show(target);
}
}
}
-- 
View this message in context: 
http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16850180.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]