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]
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > 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]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Modal-Window-not-opening-the-second-time-tp16850180p16956335.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]
>
>

Reply via email to