Package org.apache.wicket.extensions.ajax.markup.html.modal

Examples of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow


        container = new WebMarkupContainer("container");
        container.setOutputMarkupId(true);
        add(container);

        window = new ModalWindow("taskWin");
        window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        window.setInitialHeight(WIN_HEIGHT);
        window.setInitialWidth(WIN_WIDTH);
        window.setCookieName("view-task-win");
        add(window);
View Full Code Here


    private void setupProfile() {
        final WebMarkupContainer profile = new WebMarkupContainer("profile");
        profile.setOutputMarkupId(true);
        form.add(profile);

        final ModalWindow reportletConfWin = new ModalWindow("reportletConfWin");
        reportletConfWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        reportletConfWin.setCookieName("reportlet-conf-win-modal");
        reportletConfWin.setInitialHeight(REPORTLET_CONF_WIN_HEIGHT);
        reportletConfWin.setInitialWidth(REPORTLET_CONF_WIN_WIDTH);
        reportletConfWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {

            private static final long serialVersionUID = 8804221891699487139L;

            @Override
            public void onClose(final AjaxRequestTarget target) {
                int foundIdx = -1;
                if (modalReportletConfOldName != null) {
                    for (int i = 0; i < reportTO.getReportletConfs().size() && foundIdx == -1; i++) {
                        if (reportTO.getReportletConfs().get(i).getName().equals(modalReportletConfOldName)) {
                            foundIdx = i;
                        }
                    }
                }
                if (modalReportletConf != null) {
                    if (foundIdx == -1) {
                        reportTO.addReportletConf(modalReportletConf);
                    } else {
                        reportTO.getReportletConfs().set(foundIdx, modalReportletConf);
                    }
                }

                target.add(profile);
            }
        });
        add(reportletConfWin);

        final Label idLabel = new Label("idLabel", new ResourceModel("id"));
        profile.add(idLabel);

        final AjaxTextFieldPanel id = new AjaxTextFieldPanel("id", getString("id"), new PropertyModel<String>(reportTO,
                "id"));
        id.setEnabled(false);
        profile.add(id);

        final Label nameLabel = new Label("nameLabel", new ResourceModel("name"));
        profile.add(nameLabel);

        final AjaxTextFieldPanel name = new AjaxTextFieldPanel("name", getString("name"), new PropertyModel<String>(
                reportTO, "name"));
        profile.add(name);

        final AjaxTextFieldPanel lastExec = new AjaxTextFieldPanel("lastExec", getString("lastExec"),
                new DateFormatROModel(new PropertyModel<String>(reportTO, "lastExec")));
        lastExec.setEnabled(false);
        profile.add(lastExec);

        final AjaxTextFieldPanel nextExec = new AjaxTextFieldPanel("nextExec", getString("nextExec"),
                new DateFormatROModel(new PropertyModel<String>(reportTO, "nextExec")));
        nextExec.setEnabled(false);
        profile.add(nextExec);

        final SingleColumnPalette<ReportletConf> reportlets = new SingleColumnPalette<ReportletConf>("reportlets",
                new PropertyModel<List<? extends ReportletConf>>(reportTO, "reportletConfs"),
                new IChoiceRenderer<ReportletConf>() {

                    private static final long serialVersionUID = 1048000918946220007L;

                    @Override
                    public Object getDisplayValue(final ReportletConf object) {
                        return object.getName();
                    }

                    @Override
                    public String getIdValue(final ReportletConf object, int index) {

                        return object.getName();
                    }
                }, 5, true);
        reportlets.setOutputMarkupId(true);
        reportlets.addRecordBehavior(new AjaxFormComponentUpdatingBehavior("onchange") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
            }
        });
        reportlets.addRecordBehavior(new AjaxFormComponentUpdatingBehavior("onselect") {

            private static final long serialVersionUID = -1107858522700306810L;

            @Override
            protected void onUpdate(final AjaxRequestTarget target) {
                if (target.getLastFocusedElementId() != null
                        && target.getLastFocusedElementId().startsWith(EDIT_BUTTON_ID)
                        && reportlets.getSelectedItem() != null) {

                    reportletConfWin.setPageCreator(new ModalWindow.PageCreator() {

                        private static final long serialVersionUID = -7834632442532690940L;

                        @Override
                        public Page createPage() {
                            modalReportletConfOldName = reportlets.getSelectedItem().getName();
                            modalReportletConf = null;
                            return new ReportletConfModalPage(reportlets.getSelectedItem(), reportletConfWin,
                                    ReportModalPage.this.getPageReference());
                        }
                    });
                    reportletConfWin.show(target);
                }
            }
        });
        reportlets.setAddLink(new AjaxLink(ADD_BUTTON_ID) {

            private static final long serialVersionUID = -7978723352517770644L;
           
            @Override
            public void onClick(final AjaxRequestTarget target) {
                reportletConfWin.setPageCreator(new ModalWindow.PageCreator() {

                    private static final long serialVersionUID = -7834632442532690940L;

                    @Override
                    public Page createPage() {
                        modalReportletConfOldName = null;
                        modalReportletConf = null;
                        return new ReportletConfModalPage(null, reportletConfWin,
                                ReportModalPage.this.getPageReference());
                    }
                });
                reportletConfWin.show(target);
            }
        });
        reportlets.setEditLink(new AjaxLink(EDIT_BUTTON_ID) {

            private static final long serialVersionUID = -7978723352517770644L;
View Full Code Here

    private void setupExecutions() {
        final WebMarkupContainer executions = new WebMarkupContainer("executions");
        executions.setOutputMarkupId(true);
        form.add(executions);

        final ModalWindow reportExecMessageWin = new ModalWindow("reportExecMessageWin");
        reportExecMessageWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        reportExecMessageWin.setCookieName("report-exec-message-win-modal");
        add(reportExecMessageWin);

        final ModalWindow reportExecExportWin = new ModalWindow("reportExecExportWin");
        reportExecExportWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        reportExecExportWin.setCookieName("report-exec-export-win-modal");
        reportExecExportWin.setInitialHeight(EXEC_EXPORT_WIN_HEIGHT);
        reportExecExportWin.setInitialWidth(EXEC_EXPORT_WIN_WIDTH);
        reportExecExportWin.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {

            private static final long serialVersionUID = 8804221891699487139L;

            @Override
            public void onClose(final AjaxRequestTarget target) {
                AjaxExportDownloadBehavior behavior = new AjaxExportDownloadBehavior(ReportModalPage.this.exportFormat,
                        ReportModalPage.this.exportExecId);
                executions.add(behavior);
                behavior.initiate(target);
            }
        });
        add(reportExecExportWin);

        final List<IColumn> columns = new ArrayList<IColumn>();
        columns.add(new PropertyColumn(new ResourceModel("id"), "id", "id"));
        columns.add(new DatePropertyColumn(new ResourceModel("startDate"), "startDate", "startDate"));
        columns.add(new DatePropertyColumn(new ResourceModel("endDate"), "endDate", "endDate"));
        columns.add(new PropertyColumn(new ResourceModel("status"), "status", "status"));
        columns.add(new AbstractColumn<ReportExecTO>(new ResourceModel("actions", "")) {

            private static final long serialVersionUID = 2054811145491901166L;

            @Override
            public String getCssClass() {
                return "action";
            }

            @Override
            public void populateItem(final Item<ICellPopulator<ReportExecTO>> cellItem, final String componentId,
                    final IModel<ReportExecTO> model) {

                final ReportExecTO taskExecutionTO = model.getObject();

                final ActionLinksPanel panel = new ActionLinksPanel(componentId, model);

                panel.add(new ActionLink() {

                    private static final long serialVersionUID = -3722207913631435501L;

                    @Override
                    public void onClick(final AjaxRequestTarget target) {
                        reportExecMessageWin.setPageCreator(new ModalWindow.PageCreator() {

                            private static final long serialVersionUID = -7834632442532690940L;

                            @Override
                            public Page createPage() {
                                return new ExecMessageModalPage(model.getObject().getMessage());
                            }
                        });
                        reportExecMessageWin.show(target);
                    }
                }, ActionLink.ActionType.EDIT, "Reports", "read", StringUtils.hasText(model.getObject().getMessage()));

                panel.add(new ActionLink() {

                    private static final long serialVersionUID = -3722207913631435501L;

                    @Override
                    public void onClick(final AjaxRequestTarget target) {
                        reportExecExportWin.setPageCreator(new ModalWindow.PageCreator() {

                            private static final long serialVersionUID = -7834632442532690940L;

                            @Override
                            public Page createPage() {
                                ReportModalPage.this.exportExecId = model.getObject().getId();
                                return new ReportExecResultDownloadModalPage(reportExecExportWin, ReportModalPage.this.
                                        getPageReference());
                            }
                        });
                        reportExecExportWin.show(target);
                    }
                }, ActionLink.ActionType.EXPORT, "Reports", "read", ReportExecStatus.SUCCESS.name().equals(
                        model.getObject().getStatus()));

                panel.add(new ActionLink() {
View Full Code Here

    private final WebMarkupContainer container;

    public Roles(final PageParameters parameters) {
        super(parameters);

        createRoleWin = new ModalWindow("createRoleWin");
        createRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        createRoleWin.setInitialHeight(WIN_HEIGHT);
        createRoleWin.setInitialWidth(WIN_WIDTH);
        createRoleWin.setCookieName("create-role-modal");
        add(createRoleWin);
View Full Code Here

        container = new WebMarkupContainer("container");
        container.setOutputMarkupId(true);
        add(container);

        add(window = new ModalWindow("taskWin"));

        paginatorRows = prefMan.getPaginatorRows(getWebRequest(), Constants.PREF_NOTIFICATION_TASKS_PAGINATOR_ROWS);

        columns = new ArrayList<IColumn<TaskTO>>();
View Full Code Here

        container = new WebMarkupContainer("container");
        container.setOutputMarkupId(true);
        add(container);

        window = new ModalWindow("taskWin");
        window.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        window.setInitialHeight(WIN_HEIGHT);
        window.setInitialWidth(WIN_WIDTH);
        window.setCookieName("view-task-win");
        add(window);
View Full Code Here

    private final ModalWindow editRoleWin;

    public Roles(final PageParameters parameters) {
        super(parameters);

        editRoleWin = new ModalWindow("editRoleWin");
        editRoleWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        editRoleWin.setInitialHeight(WIN_HEIGHT);
        editRoleWin.setInitialWidth(WIN_WIDTH);
        editRoleWin.setCookieName("edit-role-modal");
        add(editRoleWin);
View Full Code Here

            final List<StatusBean> selectedResources, final PageReference pageref) {

        super(id);
        this.attributable = attributable;

        connObjectWin = new ModalWindow("connObjectWin");
        connObjectWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        connObjectWin.setInitialHeight(CONNOBJECT_WIN_HEIGHT);
        connObjectWin.setInitialWidth(CONNOBJECT_WIN_WIDTH);
        connObjectWin.setCookieName("connobject-modal");
        add(connObjectWin);
View Full Code Here

    private int notificationPaginatorRows;

    public Configuration(final PageParameters parameters) {
        super(parameters);

        add(createConfigWin = new ModalWindow("createConfigurationWin"));
        add(editConfigWin = new ModalWindow("editConfigurationWin"));
        setupSyncopeConf();

        add(new PoliciesPanel("passwordPoliciesPanel", getPageReference(), PolicyType.PASSWORD));
        add(new PoliciesPanel("accountPoliciesPanel", getPageReference(), PolicyType.ACCOUNT));
        add(new PoliciesPanel("syncPoliciesPanel", getPageReference(), PolicyType.SYNC));

        add(createNotificationWin = new ModalWindow("createNotificationWin"));
        add(editNotificationWin = new ModalWindow("editNotificationWin"));
        setupNotification();

        // Workflow definition stuff
        final WorkflowDefinitionTO workflowDef = wfRestClient.getDefinition();
View Full Code Here

            setup();
        }

        private void setup() {
            ModalWindow editSchemaWin = new ModalWindow("editSchemaWin");
            editSchemaWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
            editSchemaWin.setInitialWidth(WIN_WIDTH);
            if (schemaType == SchemaType.NORMAL) {
                editSchemaWin.setInitialHeight(NORMAL_WIN_HEIGHT);
            } else {
                editSchemaWin.setInitialHeight(WIN_HEIGHT);
            }
            editSchemaWin.setCookieName("editSchemaWin");
            editSchemaWin.setMarkupId("editSchemaWin");
            add(editSchemaWin);

            WebMarkupContainer schemaWrapContainer = new WebMarkupContainer("schemaWrapContainer");
            schemaWrapContainer.setOutputMarkupId(true);
            if (schemaType != SchemaType.VIRTUAL) {
View Full Code Here

TOP

Related Classes of org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.