Thanks for quick reply. I close modal window in onError method of AjaxButton. Here is code:

public class MyModal extends ModalWindow {

    public MyModal(String id) {
            super(id);
            MyPanel panel = new MyPanel(getContentId()) {
                public void onError(AjaxRequestTarget target) {
MyModal.this.close(target);
                }
            }
            setContent(panel);

    }
}

and MyPanel class:

public abstract class MyPanel extends Panel {
    public MyPanel(String id) {
        super(id);
Form form = new Form("form);
         add(form);
         AjaxButton submit = new AjaxButton("submit) {
public void onError(AjaxRequestTarget target, Form<?> parent) {
                     MyPanel.this.onError(target);
              }
public void onSubmit(AjaxRequestTarget target, Form<?> parent) {
                    //process form
              }
            }
        form.add(submit);

        //remaining form components
    }

    public abstract void onError(AjaxRequestTarget target);
}

On 10/26/2011 05:51 PM, Andrea Del Bene wrote:
How do you close modal windows? Can you copy the code?
mbinations and if combination is still available reservation process continue if not combination is removed from listview and user can choose another. If all combinations are not available than modal window is closed. This use case works fine in Chrome but modal window is not closed in firefox (content of modal window is hidden). Is there any workaround this problem?

Thanks for answer
Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


Reply via email to