Example usage for org.apache.wicket.extensions.ajax.markup.html.modal ModalWindow ModalWindow

List of usage examples for org.apache.wicket.extensions.ajax.markup.html.modal ModalWindow ModalWindow

Introduction

In this page you can find the example usage for org.apache.wicket.extensions.ajax.markup.html.modal ModalWindow ModalWindow.

Prototype

public ModalWindow(final String id, final IModel<?> model) 

Source Link

Document

Creates a new modal window component.

Usage

From source file:de.alpharogroup.wicket.dialogs.ajax.modal.ModalDialogFragmentPanel.java

License:Apache License

/**
 * Factory method for creating a new {@link ModalWindow}. This method is invoked in the
 * constructor from the derived classes and can be overridden so users can provide their own
 * version of a new {@link ModalWindow}.
 *
 * @param id//from   ww w. ja  v  a 2s  . com
 *            the wicket id
 * @param model
 *            the model
 * @return the new {@link ModalWindow}.
 */
protected ModalWindow newModalWindow(final String id, final IModel<T> model) {
    final ModalWindow modal = new ModalWindow(id, model);
    return modal;
}

From source file:org.ujorm.hotels.gui.booking.BookingEditor.java

License:Apache License

/** Create the editor dialog */
public static BookingEditor create(String componentId, int width, int height) {
    IModel<Booking> model = Model.of(new Booking());
    final ModalWindow modalWindow = new ModalWindow(componentId, model);
    modalWindow.setCssClassName(ModalWindow.CSS_CLASS_BLUE);

    final BookingEditor result = new BookingEditor(modalWindow, model);
    modalWindow.setInitialWidth(width);/*from  www.j a va 2 s  .  c  o  m*/
    modalWindow.setInitialHeight(height);
    modalWindow.setTitle(new LocalizedModel("dialog.booking.title"));
    //modalWindow.setCookieName("modal-dialog");

    return result;
}

From source file:org.ujorm.hotels.gui.customer.CustomerEditor.java

License:Apache License

/** Create the editor dialog */
public static CustomerEditor create(String componentId, int width, int height) {
    IModel<Customer> model = Model.of(new Customer());
    final ModalWindow modalWindow = new ModalWindow(componentId, model);
    modalWindow.setCssClassName(ModalWindow.CSS_CLASS_BLUE);

    final CustomerEditor result = new CustomerEditor(modalWindow, model);
    modalWindow.setInitialWidth(width);//  w  ww  .j  a v  a2s  . c  om
    modalWindow.setInitialHeight(height);
    modalWindow.setTitle(new LocalizedModel("dialog.edit.title"));
    //modalWindow.setCookieName("modal-dialog");

    return result;
}

From source file:org.ujorm.hotels.gui.customer.LoginDialog.java

License:Apache License

/** Create the editor dialog */
public static LoginDialog create(String componentId, int width, int height) {
    IModel<Customer> model = Model.of(new Customer());
    final ModalWindow modalWindow = new ModalWindow(componentId, model);
    modalWindow.setCssClassName(ModalWindow.CSS_CLASS_BLUE);

    final LoginDialog result = new LoginDialog(modalWindow, model);
    modalWindow.setInitialWidth(width);//from   ww w. j  a  v a 2  s.  c o m
    modalWindow.setInitialHeight(height);
    modalWindow.setTitle(new LocalizedModel("dialog.login.title"));
    //modalWindow.setCookieName("modal-dialog");

    return result;
}

From source file:org.ujorm.hotels.gui.hotel.HotelEditor.java

License:Apache License

/** Create the editor dialog */
public static HotelEditor create(String componentId, int width, int height) {
    IModel<Hotel> model = Model.of(new Hotel());
    final ModalWindow modalWindow = new ModalWindow(componentId, model);
    modalWindow.setCssClassName(ModalWindow.CSS_CLASS_BLUE);

    final HotelEditor result = new HotelEditor(modalWindow, model);
    modalWindow.setInitialWidth(width);/*w  w  w.j  a  v  a  2s  .  c o  m*/
    modalWindow.setInitialHeight(height);
    modalWindow.setTitle(new LocalizedModel("dialog.edit.title"));
    //modalWindow.setCookieName("modal-dialog");

    return result;
}

From source file:org.ujorm.wicket.component.dialog.domestic.MessageDialogPane.java

License:Apache License

/** Create the default message dialog */
public static MessageDialogPane create(String componentId, int width, int height) {
    IModel<String> model = Model.of("");
    final ModalWindow modalWindow = new ModalWindow(componentId, model);
    modalWindow.setCssClassName(ModalWindow.CSS_CLASS_BLUE);

    final MessageDialogPane result = new MessageDialogPane(modalWindow, model);
    modalWindow.setInitialWidth(width);/*from  w  w w .j a  v  a  2s  .  c  om*/
    modalWindow.setInitialHeight(height);
    //modalWindow.setCookieName("modal-dialog");

    return result;
}