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

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

Introduction

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

Prototype

public void show(final IPartialPageRequestHandler target) 

Source Link

Document

Shows the modal window.

Usage

From source file:com.evolveum.midpoint.web.page.admin.reports.PageCreatedReports.java

License:Apache License

private void deleteAllPerformed(AjaxRequestTarget target, ReportDeleteDialogDto.Operation op) {
    ReportDeleteDialogDto dto = new ReportDeleteDialogDto(op, null);
    deleteModel.setObject(dto);/*from w  w  w .j ava  2s . co m*/

    ModalWindow dialog = (ModalWindow) get(ID_CONFIRM_DELETE);
    dialog.show(target);
}

From source file:com.evolveum.midpoint.web.page.admin.reports.PageCreatedReports.java

License:Apache License

private void deleteSelectedPerformed(AjaxRequestTarget target, ReportDeleteDialogDto.Operation op,
        ReportOutputType single) {//  w  w  w . ja  v  a 2  s.c  o  m
    List<ReportOutputType> selected = getSelectedData();

    if (single != null) {
        selected.clear();
        selected.add(single);
    }

    if (selected.isEmpty()) {
        return;
    }

    ReportDeleteDialogDto dto = new ReportDeleteDialogDto(op, selected);
    deleteModel.setObject(dto);

    ModalWindow dialog = (ModalWindow) get(ID_CONFIRM_DELETE);
    dialog.show(target);
}

From source file:com.evolveum.midpoint.web.page.admin.resources.PageResources.java

License:Apache License

private void deleteHostPerformed(AjaxRequestTarget target) {
    List<SelectableBean<ConnectorHostType>> selected = WebMiscUtil.getSelectedData(getConnectorHostTable());
    if (selected.isEmpty()) {
        warn(getString("pageResources.message.noHostSelected"));
        target.add(getFeedbackPanel());//from  www .  j  a va2s . c o m
        return;
    }

    ModalWindow dialog = (ModalWindow) get(ID_DELETE_HOSTS_POPUP);
    dialog.show(target);
}

From source file:com.evolveum.midpoint.web.page.admin.resources.PageResources.java

License:Apache License

private void deleteResourcePerformed(AjaxRequestTarget target, ResourceDto single) {
    List<ResourceDto> selected = isAnyResourceSelected(target, single);
    singleDelete = single;//  w  w  w  .  j  ava2 s  .co m

    if (selected.isEmpty()) {
        return;
    }

    ModalWindow dialog = (ModalWindow) get(ID_DELETE_RESOURCES_POPUP);
    dialog.show(target);
}

From source file:com.evolveum.midpoint.web.page.admin.roles.PageRoles.java

License:Apache License

private void deletePerformed(AjaxRequestTarget target) {
    List<RoleType> selected = getSelectedRoles();
    if (selected.isEmpty()) {
        warn(getString("pageRoles.message.nothingSelected"));
        target.add(getFeedbackPanel());/*from  w w  w .jav a 2 s . c  o m*/
        return;
    }

    ModalWindow dialog = (ModalWindow) get(DIALOG_CONFIRM_DELETE);
    dialog.show(target);
}

From source file:com.evolveum.midpoint.web.page.admin.users.component.AssociationValueChoicePanel.java

License:Apache License

public void editValuePerformed(AjaxRequestTarget target) {
    ModalWindow window = (ModalWindow) get(MODAL_ID_OBJECT_SELECTION_POPUP);
    window.show(target);
}

From source file:com.evolveum.midpoint.web.page.admin.users.component.AssociationValueChoosePanel.java

License:Apache License

public void editValuePerformed(AjaxRequestTarget target) {
    ModalWindow window = (ModalWindow) get(MODAL_ID_OBJECT_SELECTION_POPUP);
    window.show(target);
    //        ObjectSelectionPanel dialog = (ObjectSelectionPanel) window.get(createComponentPath(window.getContentId(), ObjectSelectionPage.ID_OBJECT_SELECTION_PANEL));
    //        if (dialog != null) {
    //            dialog.updateTablePerformed(target, createChooseQuery(values));
    //        }//from   w w  w  . j a  v a2  s  . co m
}

From source file:com.evolveum.midpoint.web.page.admin.users.PageUsers.java

License:Apache License

private void deletePerformed(AjaxRequestTarget target, UserListItemDto selectedUser) {
    singleDelete = selectedUser;/* w w w . j  a v a2s .  c o m*/
    List<UserListItemDto> users = isAnythingSelected(target, selectedUser);
    if (users.isEmpty()) {
        return;
    }

    ModalWindow dialog = (ModalWindow) get(DIALOG_CONFIRM_DELETE);
    dialog.show(target);
}

From source file:com.locke.library.web.panels.attachment.AttachmentPanel.java

License:Apache License

/**
 * @param id/*from ww  w .  j a  v  a 2 s  . c o m*/
 *            Component id
 * @param css
 *            Contributor to add css
 * @param maximumSize
 *            Maximum size of uploads
 * @param model
 *            List of attachments to edit
 * @param features
 *            Any features to enable
 */
public AttachmentPanel(String id, final HeaderContributor css, final Bytes maximumSize,
        final IModel<List<IAttachment>> model, Feature... features) {

    super(id, model);

    // Save maximum size
    this.maximumSize = maximumSize;

    // Save features list
    this.features = features;

    // To enable list updating
    setOutputMarkupId(true);

    // Local feedback for attachment uploading and deleting messages
    LocalFeedbackContainer container = new LocalFeedbackContainer("feedbackContainer");
    container.add(new LocalFeedbackPanel("feedback", container));

    // Add list of attachments
    container.add(new AttachmentList("attachments"));

    // Add upload form
    container.add(new AttachmentUploadForm("uploadForm"));

    // Modal window to pop up when editing attachments
    final ModalWindow modalWindow = new AttachmentModalWindow("popupEditorModalWindow", css, getPopupWidth(),
            getPopupHeight(), isPopupResizable());
    container.add(modalWindow);

    // Add edit link
    container.add(new AjaxLink("popupEditorLink") {

        private static final long serialVersionUID = 1104804510460622982L;

        @Override
        public void onClick(final AjaxRequestTarget target) {
            modalWindow.show(target);
        }

        @Override
        public boolean isVisible() {
            return featureEnabled(Feature.POPUP_EDITOR_LINK);
        }
    });

    // Add local feedback container
    add(container);
}

From source file:com.socialsite.course.NewCoursePanel.java

License:Open Source License

public NewCoursePanel(String id) {
    super(id);/*from  ww  w . j  ava2  s. com*/
    final ModalWindow courseModal;
    add(courseModal = new ModalWindow("coursemodal"));

    courseModal.setContent(new NewCourseModal(courseModal.getContentId()));
    courseModal.setTitle("Create new Course");
    courseModal.setCookieName("coursemodal");

    courseModal.setCloseButtonCallback(new ModalWindow.CloseButtonCallback() {
        /**
         * 
         */
        private static final long serialVersionUID = 1L;

        public boolean onCloseButtonClicked(AjaxRequestTarget target) {
            return true;
        }
    });

    courseModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
        /**
         * 
         */
        private static final long serialVersionUID = 1L;

        public void onClose(AjaxRequestTarget target) {

        }
    });

    add(new AjaxLink<Void>("newcourse") {
        /**
         * 
         */
        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            courseModal.show(target);
        }
    });
}