Re: ModalWindow bug - unable to close when added AjaxButton in content of the window

2007-12-16 Thread Thies Edeling
Was there any resolution for this? I have the same thing with rc2 with a
valid form. From the javascript console:

*INFO: *
Initiating Ajax POST request on ../../?wicket:interface=:4:39:::0:2random=
0.745044540904514
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (457 characters)
*INFO: *
?xml version=1.0
 encoding=UTF-8?ajax-responseevaluate![CDATA[var win;
try {
win = window.parent.Wicket.Window;
} catch (ignore) {
}
if (typeof(win) == undefined || typeof(win.current) == undefined) {
  try {
 win = window.Wicket.Window;
  } catch (ignore) {
  }
}
if (typeof(win) != undefined  typeof(win.current) != undefined) {
window.parent.setTimeout(function() {
win.current.close();
}, 0);
}]]/evaluate/ajax-response
*INFO: *Response parsed. Now invoking steps...
*ERROR: *Exception evaluating javascript: TypeError:
window.parent.setTimeout is not a function


On Sep 20, 2007 9:58 AM, Vit Rozkovec [EMAIL PROTECTED] wrote:

 Yes, the form validates, I put the breakpoint at onSubmit and that
 method was invoked.
 I tried it also with empty form.
 The behavior is following:
 when I have only AjaxLinks in the form, it is ok.
 When I add AjaxButton, the behavior changes - the first time the modal
 window is displayed, it is possible to close the window with the cross
 in the upper right corner and with any AjaxLink I have in the form. But
 only when the first click goes to one of these elements.
 When I first click on the button to close the window, suddently the
 cross and the links became dead too.

 Vitek

 Matej Knopp wrote:
  Are you sure your Form validates, when you click AjaxLink? Because
  otherwise the onSubmit is not invoked. Can you put a breakpoint in
  onSubmit? Also there is onError handler that is invoked when form
  validation fails.
 
  -Matej
 
  On 9/14/07, Vit Rozkovec [EMAIL PROTECTED] wrote:
 
  I am sorry, I could not replicate it in quickstart. The button works
  fine there. For now I solved the problem by replacing AjaxButtons with
  AjaxLinks.
 
  Vitek
 
  Matej Knopp wrote:
 
  Plase create a jira issue and attach a quickstart to it. Thanks.
 
  -Matej
 
  On 9/13/07, Vit Rozkovec [EMAIL PROTECTED] wrote:
 
 
  Good day,
  I am using last snapshot of wicket and there is a problem with modal
  window - I create instance of the window and add it to the page. As a
  content I use a panel which has these components:
 
  public class ModalConfirmationPanel extends Panel {
 
  public ModalConfirmationPanel(String id, final ModalWindow
 window) {
  super(id);
 
  window.setTitle(getString(titulek));
 
  Form form = new Form(confirmation);
  add(form);
  form.add(new TextArea(explanation, new Model()));
  form.add(new AjaxLink(ok) {
  @Override
  public void onClick(AjaxRequestTarget target) {
  window.close(target);
  }
  });
  form.add(new AjaxLink(storno) {
  @Override
  public void onClick(AjaxRequestTarget target) {
  window.close(target);
  }
  });
  //form.add(new AjaxSubmitButton(buttonOk, form) {
  //@Override
  //protected void onSubmit(AjaxRequestTarget target, Form
 form) {
  //window.close(target);
  //}
  //});
  //form.add(new AjaxButton(buttonStorno, form) {
  //@Override
  //protected void onSubmit(AjaxRequestTarget target, Form
 form) {
  //window.close(target);
  //}
  //});
 
 
  When I uncomment the lines and add AjaxSubmitButtons or AjaxButtons,
 the
  modal window cannot be closed anymore, neither with the buttons, nor
  with the close button in the header or with links. When I add just
  links, it works ok. It does not matter if there is window.close()
 method
  in the button's onSubmit method.
 
  If you would like I can make a quickstart. I cannot test anymore, but
 in
  beta3 it worked.
 
  Vitek
 
  -
  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]
 
 
 
  -
  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: ModalWindow bug - unable to close when added AjaxButton in content of the window

2007-12-16 Thread Thies Edeling
never mind, seems it's the same as 
https://issues.apache.org/jira/browse/WICKET-1003


Thies Edeling wrote:

Was there any resolution for this? I have the same thing with rc2 with a
valid form. From the javascript console:

*INFO: *
Initiating Ajax POST request on ../../?wicket:interface=:4:39:::0:2random=
0.745044540904514
*INFO: *Invoking pre-call handler(s)...
*INFO: *Received ajax response (457 characters)
*INFO: *
?xml version=1.0
 encoding=UTF-8?ajax-responseevaluate![CDATA[var win;
try {
win = window.parent.Wicket.Window;
} catch (ignore) {
}
if (typeof(win) == undefined || typeof(win.current) == undefined) {
  try {
 win = window.Wicket.Window;
  } catch (ignore) {
  }
}
if (typeof(win) != undefined  typeof(win.current) != undefined) {
window.parent.setTimeout(function() {
win.current.close();
}, 0);
}]]/evaluate/ajax-response
*INFO: *Response parsed. Now invoking steps...
*ERROR: *Exception evaluating javascript: TypeError:
window.parent.setTimeout is not a function


On Sep 20, 2007 9:58 AM, Vit Rozkovec [EMAIL PROTECTED] wrote:

  

Yes, the form validates, I put the breakpoint at onSubmit and that
method was invoked.
I tried it also with empty form.
The behavior is following:
when I have only AjaxLinks in the form, it is ok.
When I add AjaxButton, the behavior changes - the first time the modal
window is displayed, it is possible to close the window with the cross
in the upper right corner and with any AjaxLink I have in the form. But
only when the first click goes to one of these elements.
When I first click on the button to close the window, suddently the
cross and the links became dead too.

Vitek

Matej Knopp wrote:


Are you sure your Form validates, when you click AjaxLink? Because
otherwise the onSubmit is not invoked. Can you put a breakpoint in
onSubmit? Also there is onError handler that is invoked when form
validation fails.

-Matej

On 9/14/07, Vit Rozkovec [EMAIL PROTECTED] wrote:

  

I am sorry, I could not replicate it in quickstart. The button works
fine there. For now I solved the problem by replacing AjaxButtons with
AjaxLinks.

Vitek

Matej Knopp wrote:



Plase create a jira issue and attach a quickstart to it. Thanks.

-Matej

On 9/13/07, Vit Rozkovec [EMAIL PROTECTED] wrote:


  

Good day,
I am using last snapshot of wicket and there is a problem with modal
window - I create instance of the window and add it to the page. As a
content I use a panel which has these components:

public class ModalConfirmationPanel extends Panel {

public ModalConfirmationPanel(String id, final ModalWindow


window) {


super(id);

window.setTitle(getString(titulek));

Form form = new Form(confirmation);
add(form);
form.add(new TextArea(explanation, new Model()));
form.add(new AjaxLink(ok) {
@Override
public void onClick(AjaxRequestTarget target) {
window.close(target);
}
});
form.add(new AjaxLink(storno) {
@Override
public void onClick(AjaxRequestTarget target) {
window.close(target);
}
});
//form.add(new AjaxSubmitButton(buttonOk, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form


form) {


//window.close(target);
//}
//});
//form.add(new AjaxButton(buttonStorno, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form


form) {


//window.close(target);
//}
//});


When I uncomment the lines and add AjaxSubmitButtons or AjaxButtons,


the


modal window cannot be closed anymore, neither with the buttons, nor
with the close button in the header or with links. When I add just
links, it works ok. It does not matter if there is window.close()


method


in the button's onSubmit method.

If you would like I can make a quickstart. I cannot test anymore, but


in


beta3 it worked.

Vitek

-
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]



  

-
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]


  



  



-
To unsubscribe, e-mail: [EMAIL 

Re: ModalWindow bug - unable to close when added AjaxButton in content of the window

2007-09-20 Thread Vit Rozkovec
Yes, the form validates, I put the breakpoint at onSubmit and that 
method was invoked.

I tried it also with empty form.
The behavior is following:
when I have only AjaxLinks in the form, it is ok.
When I add AjaxButton, the behavior changes - the first time the modal 
window is displayed, it is possible to close the window with the cross 
in the upper right corner and with any AjaxLink I have in the form. But 
only when the first click goes to one of these elements.
When I first click on the button to close the window, suddently the 
cross and the links became dead too.


Vitek

Matej Knopp wrote:

Are you sure your Form validates, when you click AjaxLink? Because
otherwise the onSubmit is not invoked. Can you put a breakpoint in
onSubmit? Also there is onError handler that is invoked when form
validation fails.

-Matej

On 9/14/07, Vit Rozkovec [EMAIL PROTECTED] wrote:
  

I am sorry, I could not replicate it in quickstart. The button works
fine there. For now I solved the problem by replacing AjaxButtons with
AjaxLinks.

Vitek

Matej Knopp wrote:


Plase create a jira issue and attach a quickstart to it. Thanks.

-Matej

On 9/13/07, Vit Rozkovec [EMAIL PROTECTED] wrote:

  

Good day,
I am using last snapshot of wicket and there is a problem with modal
window - I create instance of the window and add it to the page. As a
content I use a panel which has these components:

public class ModalConfirmationPanel extends Panel {

public ModalConfirmationPanel(String id, final ModalWindow window) {
super(id);

window.setTitle(getString(titulek));

Form form = new Form(confirmation);
add(form);
form.add(new TextArea(explanation, new Model()));
form.add(new AjaxLink(ok) {
@Override
public void onClick(AjaxRequestTarget target) {
window.close(target);
}
});
form.add(new AjaxLink(storno) {
@Override
public void onClick(AjaxRequestTarget target) {
window.close(target);
}
});
//form.add(new AjaxSubmitButton(buttonOk, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form form) {
//window.close(target);
//}
//});
//form.add(new AjaxButton(buttonStorno, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form form) {
//window.close(target);
//}
//});


When I uncomment the lines and add AjaxSubmitButtons or AjaxButtons, the
modal window cannot be closed anymore, neither with the buttons, nor
with the close button in the header or with links. When I add just
links, it works ok. It does not matter if there is window.close() method
in the button's onSubmit method.

If you would like I can make a quickstart. I cannot test anymore, but in
beta3 it worked.

Vitek

-
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]


  

-
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: ModalWindow bug - unable to close when added AjaxButton in content of the window

2007-09-14 Thread Matej Knopp
Are you sure your Form validates, when you click AjaxLink? Because
otherwise the onSubmit is not invoked. Can you put a breakpoint in
onSubmit? Also there is onError handler that is invoked when form
validation fails.

-Matej

On 9/14/07, Vit Rozkovec [EMAIL PROTECTED] wrote:
 I am sorry, I could not replicate it in quickstart. The button works
 fine there. For now I solved the problem by replacing AjaxButtons with
 AjaxLinks.

 Vitek

 Matej Knopp wrote:
  Plase create a jira issue and attach a quickstart to it. Thanks.
 
  -Matej
 
  On 9/13/07, Vit Rozkovec [EMAIL PROTECTED] wrote:
 
  Good day,
  I am using last snapshot of wicket and there is a problem with modal
  window - I create instance of the window and add it to the page. As a
  content I use a panel which has these components:
 
  public class ModalConfirmationPanel extends Panel {
 
  public ModalConfirmationPanel(String id, final ModalWindow window) {
  super(id);
 
  window.setTitle(getString(titulek));
 
  Form form = new Form(confirmation);
  add(form);
  form.add(new TextArea(explanation, new Model()));
  form.add(new AjaxLink(ok) {
  @Override
  public void onClick(AjaxRequestTarget target) {
  window.close(target);
  }
  });
  form.add(new AjaxLink(storno) {
  @Override
  public void onClick(AjaxRequestTarget target) {
  window.close(target);
  }
  });
  //form.add(new AjaxSubmitButton(buttonOk, form) {
  //@Override
  //protected void onSubmit(AjaxRequestTarget target, Form form) 
  {
  //window.close(target);
  //}
  //});
  //form.add(new AjaxButton(buttonStorno, form) {
  //@Override
  //protected void onSubmit(AjaxRequestTarget target, Form form) 
  {
  //window.close(target);
  //}
  //});
 
 
  When I uncomment the lines and add AjaxSubmitButtons or AjaxButtons, the
  modal window cannot be closed anymore, neither with the buttons, nor
  with the close button in the header or with links. When I add just
  links, it works ok. It does not matter if there is window.close() method
  in the button's onSubmit method.
 
  If you would like I can make a quickstart. I cannot test anymore, but in
  beta3 it worked.
 
  Vitek
 
  -
  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]
 
 


 -
 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]



ModalWindow bug - unable to close when added AjaxButton in content of the window

2007-09-13 Thread Vit Rozkovec

Good day,
I am using last snapshot of wicket and there is a problem with modal 
window - I create instance of the window and add it to the page. As a 
content I use a panel which has these components:


public class ModalConfirmationPanel extends Panel {

   public ModalConfirmationPanel(String id, final ModalWindow window) {
   super(id);
  
   window.setTitle(getString(titulek));
  
   Form form = new Form(confirmation);

   add(form);
   form.add(new TextArea(explanation, new Model()));
   form.add(new AjaxLink(ok) {
   @Override
   public void onClick(AjaxRequestTarget target) {
   window.close(target);   
   }

   });
   form.add(new AjaxLink(storno) {
   @Override
   public void onClick(AjaxRequestTarget target) {
   window.close(target);   
   }

   });
//form.add(new AjaxSubmitButton(buttonOk, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form form) {
//window.close(target);
//}
//});
//form.add(new AjaxButton(buttonStorno, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form form) {
//window.close(target);
//}
//});


When I uncomment the lines and add AjaxSubmitButtons or AjaxButtons, the 
modal window cannot be closed anymore, neither with the buttons, nor 
with the close button in the header or with links. When I add just 
links, it works ok. It does not matter if there is window.close() method 
in the button's onSubmit method.


If you would like I can make a quickstart. I cannot test anymore, but in 
beta3 it worked.


Vitek

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



Re: ModalWindow bug - unable to close when added AjaxButton in content of the window

2007-09-13 Thread Matej Knopp
Plase create a jira issue and attach a quickstart to it. Thanks.

-Matej

On 9/13/07, Vit Rozkovec [EMAIL PROTECTED] wrote:
 Good day,
 I am using last snapshot of wicket and there is a problem with modal
 window - I create instance of the window and add it to the page. As a
 content I use a panel which has these components:

 public class ModalConfirmationPanel extends Panel {

 public ModalConfirmationPanel(String id, final ModalWindow window) {
 super(id);

 window.setTitle(getString(titulek));

 Form form = new Form(confirmation);
 add(form);
 form.add(new TextArea(explanation, new Model()));
 form.add(new AjaxLink(ok) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 window.close(target);
 }
 });
 form.add(new AjaxLink(storno) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 window.close(target);
 }
 });
 //form.add(new AjaxSubmitButton(buttonOk, form) {
 //@Override
 //protected void onSubmit(AjaxRequestTarget target, Form form) {
 //window.close(target);
 //}
 //});
 //form.add(new AjaxButton(buttonStorno, form) {
 //@Override
 //protected void onSubmit(AjaxRequestTarget target, Form form) {
 //window.close(target);
 //}
 //});


 When I uncomment the lines and add AjaxSubmitButtons or AjaxButtons, the
 modal window cannot be closed anymore, neither with the buttons, nor
 with the close button in the header or with links. When I add just
 links, it works ok. It does not matter if there is window.close() method
 in the button's onSubmit method.

 If you would like I can make a quickstart. I cannot test anymore, but in
 beta3 it worked.

 Vitek

 -
 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: ModalWindow bug - unable to close when added AjaxButton in content of the window

2007-09-13 Thread Vit Rozkovec
I am sorry, I could not replicate it in quickstart. The button works 
fine there. For now I solved the problem by replacing AjaxButtons with 
AjaxLinks.


Vitek

Matej Knopp wrote:

Plase create a jira issue and attach a quickstart to it. Thanks.

-Matej

On 9/13/07, Vit Rozkovec [EMAIL PROTECTED] wrote:
  

Good day,
I am using last snapshot of wicket and there is a problem with modal
window - I create instance of the window and add it to the page. As a
content I use a panel which has these components:

public class ModalConfirmationPanel extends Panel {

public ModalConfirmationPanel(String id, final ModalWindow window) {
super(id);

window.setTitle(getString(titulek));

Form form = new Form(confirmation);
add(form);
form.add(new TextArea(explanation, new Model()));
form.add(new AjaxLink(ok) {
@Override
public void onClick(AjaxRequestTarget target) {
window.close(target);
}
});
form.add(new AjaxLink(storno) {
@Override
public void onClick(AjaxRequestTarget target) {
window.close(target);
}
});
//form.add(new AjaxSubmitButton(buttonOk, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form form) {
//window.close(target);
//}
//});
//form.add(new AjaxButton(buttonStorno, form) {
//@Override
//protected void onSubmit(AjaxRequestTarget target, Form form) {
//window.close(target);
//}
//});


When I uncomment the lines and add AjaxSubmitButtons or AjaxButtons, the
modal window cannot be closed anymore, neither with the buttons, nor
with the close button in the header or with links. When I add just
links, it works ok. It does not matter if there is window.close() method
in the button's onSubmit method.

If you would like I can make a quickstart. I cannot test anymore, but in
beta3 it worked.

Vitek

-
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]

  



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