Examples of ModalWindow


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

        getRequestCycleListeners().add(new SyncopeRequestCycleListener());
    }

    public void setupNavigationPanel(final WebPage page, final XMLRolesReader xmlRolesReader, final boolean notsel) {
        final ModalWindow infoModal = new ModalWindow("infoModal");
        page.add(infoModal);
        infoModal.setInitialWidth(350);
        infoModal.setInitialHeight(300);
        infoModal.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        infoModal.setCookieName("infoModal");
        infoModal.setPageCreator(new ModalWindow.PageCreator() {

            private static final long serialVersionUID = -7834632442532690940L;

            @Override
            public Page createPage() {
                return new InfoModalPage();
            }
        });

        final AjaxLink<Void> infoLink = new AjaxLink<Void>("infoLink") {

            private static final long serialVersionUID = -7978723352517770644L;

            @Override
            public void onClick(final AjaxRequestTarget target) {
                infoModal.show(target);
            }
        };
        page.add(infoLink);

        BookmarkablePageLink<Void> schemaLink = new BookmarkablePageLink<Void>("schema", Schema.class);
View Full Code Here

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

                });
            }
        }

        // Modal window for editing user profile
        final ModalWindow editProfileModalWin = new ModalWindow("editProfileModal");
        editProfileModalWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);
        editProfileModalWin.setInitialHeight(EDIT_PROFILE_WIN_HEIGHT);
        editProfileModalWin.setInitialWidth(EDIT_PROFILE_WIN_WIDTH);
        editProfileModalWin.setCookieName("edit-profile-modal");
        add(editProfileModalWin);

        final AjaxLink editProfileLink = new AjaxLink("editProfileLink") {

            private static final long serialVersionUID = -7978723352517770644L;

            @Override
            public void onClick(final AjaxRequestTarget target) {
                final UserTO userTO = SyncopeSession.get().isAuthenticated()
                        ? userRestClient.readProfile()
                        : new UserTO();

                editProfileModalWin.setPageCreator(new ModalWindow.PageCreator() {

                    private static final long serialVersionUID = -7834632442532690940L;

                    @Override
                    public Page createPage() {
                        return new UserRequestModalPage(BasePage.this.getPageReference(), editProfileModalWin,
                                userTO, UserModalPage.Mode.SELF);
                    }
                });

                editProfileModalWin.show(target);
            }
        };

        editProfileLink.add(new Label("username", SyncopeSession.get().getUserId()));
View Full Code Here

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

    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

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

    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

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

    private int connectorPaginatorRows;

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

        add(createResourceWin = new ModalWindow("createResourceWin"));
        add(editResourceWin = new ModalWindow("editResourceWin"));
        add(createConnectorWin = new ModalWindow("createConnectorWin"));
        add(editConnectorWin = new ModalWindow("editConnectorWin"));

        AjaxLink<Void> reloadLink = new ClearIndicatingAjaxLink<Void>("reloadLink", getPageReference()) {

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

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

                    new PropertyModel(this, "document.page"));
            infoForm.add(defaultPageLabel);
            infoForm.add(defaultPageField);
            defaultPageLabel.setVisibilityAllowed(true);
            defaultPageField.setVisibilityAllowed(true);
            final ModalWindow metaDataModalWindow;
            add(metaDataModalWindow = new ModalWindow("modalwindow"));
           
            AjaxButton addFolder = new AjaxButton("addFolder",new ResourceModel("add.subfolder"),infoForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow.setContent(new AddFolderPanel(metaDataModalWindow.getContentId()));
                    metaDataModalWindow.show(target);
                }
            };
            infoForm.add(addFolder);
           
            AjaxButton addPage = new AjaxButton("addPage",new ResourceModel("add.page"),infoForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow.setContent(new AddPagePanel(
                            metaDataModalWindow.getContentId()));
                    metaDataModalWindow.show(target);
                }
            };
            infoForm.add(addPage);
           
            AjaxButton addLink = new AjaxButton("addLink",new ResourceModel("add.link"),infoForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow.setContent(new AddLinkPanel(metaDataModalWindow.getContentId()));
                    metaDataModalWindow.show(target);
                }
            };
            infoForm.add(addLink);
           
            addFolder.setVisibilityAllowed(true);
            addPage.setVisibilityAllowed(true);
            addLink.setVisibilityAllowed(true);
            SiteTreeNode node = getUserSelectedNode();
           
            if (node.getDocType() == SiteTreeNode.FileType.Folder)
            {
                urlLabel.setVisible(false);
                urlField.setVisible(false);
                targetLabel.setVisible(false);
                targetField.setVisible(false);
                addFolder.setVisible(true);
                addPage.setVisible(true);
                addLink.setVisible(true);
            }
            else if (node.getDocType() == SiteTreeNode.FileType.Page)
            {
                defaultPageLabel.setVisible(false);
                defaultPageField.setVisible(false);
                urlLabel.setVisible(false);
                urlField.setVisible(false);
                targetLabel.setVisible(false);
                targetField.setVisible(false);
                addFolder.setVisible(false);
                addPage.setVisible(false);
                addLink.setVisible(false);
            }
            else if (node.getDocType() == SiteTreeNode.FileType.Link)
            {
                defaultPageLabel.setVisible(false);
                defaultPageField.setVisible(false);
                targetLabel.setVisible(true);
                defaultPageField.setVisible(false);
                pageDecoratorLabel.setVisible(false);
                decoratorsList.setVisible(false);
                portletDecoratorLabel.setVisible(false);
                portletDecoratorsList.setVisible(false);
                themeField.setVisible(false);
                themeLabel.setVisible(false);
                addFolder.setVisible(false);
                addPage.setVisible(false);
                addLink.setVisible(false);
            }
           
            if (node.getDocType() == SiteTreeNode.FileType.Link)
            {
                ExternalLink viewLink = new ExternalLink("view", new Model(getDocument().getUrl()), new ResourceModel("common.view"))
                {
                    @Override
                    protected void onComponentTag(ComponentTag tag)
                    {
                        super.onComponentTag(tag);
                       
                        if (tag.getName().equalsIgnoreCase("input") && ((getLabel() != null) && (getLabel().getObject() != null)))
                        {
                            tag.put("value", getDefaultModelObjectAsString(getLabel().getObject()));
                        }
                    }
                };
                viewLink.setPopupSettings(new PopupSettings());
                infoForm.add(viewLink);
            }
            else
            {
                RequestContext context = (RequestContext) getPortletRequest().getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
                String basePath = context.getPortalURL().getBasePath().replace("portal", "configure");
                ExternalLink viewLink = new ExternalLink("view", new Model(basePath + getDocument().getPath()), new ResourceModel("common.view"))
                {
                    @Override
                    protected void onComponentTag(ComponentTag tag)
                    {
                        super.onComponentTag(tag);
                       
                        if (tag.getName().equalsIgnoreCase("input") && ((getLabel() != null) && (getLabel().getObject() != null)))
                        {
                            tag.put("value", getDefaultModelObjectAsString(getLabel().getObject()));
                        }
                    }
                };
                viewLink.setPopupSettings(new PopupSettings());
                infoForm.add(viewLink);
            }

            infoForm.add(new AjaxButton("remove",new ResourceModel("common.remove"),infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form form)
                {
                    excuteAction(getDocument(), REMOVE_ACTION);
                    DefaultMutableTreeNode node = getSelectedNode();
                    if (node != null && node.getParent() != null)
                    {
                        DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) node.getParent();
                        parentNode.remove(node);
                        LinkTree tree = (PortalTree) getPage().get("siteTree");
                        tree.updateTree(target);
                    }
                }
            }.add(new JavascriptEventConfirmation("onclick", new ResourceModel("action.delete.confirm"))));
            infoForm.add(new AjaxButton("save",new ResourceModel("common.save"), infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form form)
                {
                    excuteAction(getDocument(), SAVE_ACTION);
                }
            });
            infoForm.add(new AjaxButton("copy",new ResourceModel("common.copy"),infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    SiteTreeNode selectedNode = getUserSelectedNode();
                    metaDataModalWindow.setContent(new CopyMoveWindow(
                            metaDataModalWindow.getContentId(), selectedNode
                                    .getDocType().name(), selectedNode
                                    .getNodeName(), getUserSelectedNode()
                                    .getNodePath(), true));
                    metaDataModalWindow.show(target);
                }
            });
            infoForm.add(new AjaxButton("move",new ResourceModel("common.move"),infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    SiteTreeNode selectedNode = getUserSelectedNode();
                    metaDataModalWindow.setContent(new CopyMoveWindow(
                            metaDataModalWindow.getContentId(), selectedNode
                                    .getDocType().name(), selectedNode
                                    .getNodeName(), getUserSelectedNode()
                                    .getNodePath(), false));
                    metaDataModalWindow.show(target);
                }
            });
            add(infoForm);
        }
View Full Code Here

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

        private static final long serialVersionUID = 7948533482848224251L;

        public SecurityTab(String id, JetspeedDocument document)
        {
            super(id, document);
            final ModalWindow metaDataModalWindow;
            add(metaDataModalWindow = new ModalWindow("modalwindow"));
            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
                    "basePanel");
            ajaxPanel.setOutputMarkupId(true);
            ajaxPanel.add(new Label("constraintLabel",new ResourceModel("security.constraint.title")));
            ajaxPanel.add(new Label("constraintTypeLabel",new ResourceModel("security.type.title")));
           
            ajaxPanel.add(new ListView("metaData", new PropertyModel(this,
                    "document.securityConstraints"))
            {

                public void populateItem(final ListItem listItem)
                {
                    final String constraints = (String) listItem
                            .getModelObject();
                    listItem.add(new Label("name", constraints));
                    listItem.add(new Label("type", new ResourceModel("security.ref")));
                    AjaxLink editLink = new AjaxLink("edit")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataModalWindow
                                    .setContent(new SecurityTabWindowPanel(
                                            metaDataModalWindow.getContentId(),
                                            constraints, ajaxPanel));
                            metaDataModalWindow.show(target);
                            target.addComponent(ajaxPanel);
                        }
                    };
                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
                    listItem.add(editLink);
                   
                    AjaxLink deleteLink = new AjaxLink("delete")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            securityConstraintAction(REMOVE_ACTION,
                                    constraints, "");
                            target.addComponent(ajaxPanel);
                        }
                    };
                    deleteLink.add(new JavascriptEventConfirmation("onclick",new ResourceModel("action.delete.confirm")));                   
                    deleteLink.add(new Label("deleteLabel",new ResourceModel("common.delete")));
                    listItem.add(deleteLink);
                }
            });
            Form securityForm = new Form("securityFrom");
            add(new AjaxButton("new",new ResourceModel("common.new"),securityForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow.setContent(new SecurityTabWindowPanel(
                            metaDataModalWindow.getContentId(), "", ajaxPanel));
                    metaDataModalWindow.show(target);
                }
            });
            add(ajaxPanel);
            add(securityForm);
        }
View Full Code Here

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

        public MenuSeparatorPanel(String id, JetspeedDocument document,
                MenuDefinition definition)
        {
            super(id, document, definition);
            final ModalWindow metaDataModalWindow;
            getMenuElements(definition, MenuElement.SEPARATOR_ELEMENT_TYPE);
            add(metaDataModalWindow = new ModalWindow("modalwindow"));
            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
                    "basePanel");
            ajaxPanel.setOutputMarkupId(true);
            ajaxPanel.add(new Label("textLabel",new ResourceModel("menu.text")));
            ajaxPanel.add(new Label("titleLabel",new ResourceModel("menu.title")));
            ajaxPanel.add(new ListView("separator", new PropertyModel(this,
                    "menuOptions"))
            {

                public void populateItem(final ListItem listItem)
                {
                    final MenuSeparatorDefinition separator = (MenuSeparatorDefinition) listItem
                            .getModelObject();
                    listItem.add(new Label("text", separator.getText()));
                    listItem.add(new Label("title", separator.getTitle()));
                    AjaxLink editLink = new AjaxLink("edit")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataModalWindow.setContent(new SeparatorWindow(
                                    metaDataModalWindow.getContentId(),separator, ajaxPanel));
                            metaDataModalWindow.show(target);
                        }
                    };
                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
                    listItem.add(editLink);
                    AjaxLink deleteLink = new AjaxLink("delete")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            menuActions(REMOVE_ACTION, separator.getText() ,new SeparatorDefinitionBean());
                            target.addComponent(ajaxPanel);
                        }                       
                    };
                    deleteLink.add(new Label("deleteLabel",new ResourceModel("common.delete")));
                    deleteLink.add(new JavascriptEventConfirmation("onclick",new ResourceModel("action.delete.confirm")))
                    listItem.add(deleteLink);
                }
            });
            Form separtorForm = new Form("sepForm");
            add(separtorForm);
            add(new AjaxButton("new",new ResourceModel("common.new"),separtorForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    MenuSeparatorDefinition separatorDefinition = null;
                    if (getUserSelectedNode().getDocType() == FileType.Folder)
                    {
                        separatorDefinition = getServiceLocator()
                                .getPageManager()
                                .newFolderMenuSeparatorDefinition();
                    } else
                    {
                        separatorDefinition = getServiceLocator()
                                .getPageManager()
                                .newPageMenuSeparatorDefinition();
                    }
                    metaDataModalWindow.setContent(new SeparatorWindow(
                            metaDataModalWindow.getContentId(), separatorDefinition, ajaxPanel));
                    metaDataModalWindow.show(target);
                }
            });
            add(ajaxPanel);
        }
View Full Code Here

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

        public MenuExlcudesPanel(String id, JetspeedDocument document,
                MenuDefinition definition)
        {
            super(id, document, definition);
            getMenuElements(definition, EXCLUDES);
            final ModalWindow metaDataModalWindow;
            add(metaDataModalWindow = new ModalWindow("modalwindow"));
            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
                    "basePanel");
            ajaxPanel.setOutputMarkupId(true);
            ajaxPanel.add(new Label("nameLabel",new ResourceModel("common.name")));
            ajaxPanel.add(new ListView("menuData", new PropertyModel(this,
                    "menuOptions"))
            {

                public void populateItem(final ListItem listItem)
                {
                    final MenuExcludeDefinition option = (MenuExcludeDefinition) listItem
                            .getModelObject();
                    listItem.add(new Label("name", option.getName()));
                    AjaxLink editLink = new AjaxLink("edit")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataModalWindow.setContent(new ExcludesWindow(
                                    metaDataModalWindow.getContentId(),option, ajaxPanel));
                            metaDataModalWindow.show(target);
                        }
                    };
                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
                    listItem.add(editLink);
                    AjaxLink deleteLink = new AjaxLink("delete")
                    {
                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            menuActions(REMOVE_ACTION,option.getName(), new ExcludesDefinitionBean());
                            target.addComponent(ajaxPanel);
                        }
                    };
                    deleteLink.add(new JavascriptEventConfirmation("onclick",
                            new ResourceModel("action.delete.confirm")));
                    deleteLink.add(new Label("deleteLabel",new ResourceModel("common.delete")));
                    listItem.add(deleteLink);
                }
            });
            Form excludeForm = new Form("excludeForm");
            add(excludeForm);
            add(new AjaxButton("new",new ResourceModel("common.new"),excludeForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    MenuExcludeDefinition excludeDefinition = null;
                    if (getUserSelectedNode().getDocType() == FileType.Folder)
                    {
                        excludeDefinition = getServiceLocator()
                                .getPageManager()
                                .newFolderMenuExcludeDefinition();
                    } else
                    {
                        excludeDefinition = getServiceLocator()
                                .getPageManager()
                                .newPageMenuExcludeDefinition();
                    }
                    metaDataModalWindow.setContent(new ExcludesWindow(
                            metaDataModalWindow.getContentId(),excludeDefinition, ajaxPanel));
                    metaDataModalWindow.show(target);
                }
            });
            add(ajaxPanel);
        }
View Full Code Here

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

        private static final long serialVersionUID = 6429774536790672910L;

        public MetaDataTab(String id, JetspeedDocument doc)
        {
            super(id, doc);
            final ModalWindow metaDataModalWindow;
            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
                    "basePanel");
            add(metaDataModalWindow = new ModalWindow("modalwindow"));

            ajaxPanel.add(new Label("nameLabel", new ResourceModel(
                    "metedataTab.name")));
            ajaxPanel.add(new Label("languageLabel", new ResourceModel(
                    "metedataTab.language")));

            final ListView metaDataListView = new ListView("metaData",
                    new PropertyModel(this, "document.metaData"))
            {

                private static final long serialVersionUID = 1L;

                public void populateItem(final ListItem listItem)
                {
                    final JetspeedDocumentMetaData metaData = (JetspeedDocumentMetaData) listItem
                            .getModelObject();
                    listItem.add(new Label("name", metaData.getName()));
                    listItem.add(new Label("language", metaData.getLanguage()));
                    listItem.add(new Label("value", metaData.getValue()));
                    AjaxLink editLink = new AjaxLink("edit", new Model("edit"))
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataModalWindow.setContent(new MetaDataPanel(
                                    metaDataModalWindow.getContentId(),
                                    metaData, ajaxPanel));
                            metaDataModalWindow.show(target);
                        }
                    };
                    editLink.add(new Label("editLabel", new ResourceModel(
                            "common.edit")));
                    listItem.add(editLink);

                    AjaxLink deleteLink = new AjaxLink("delete", new Model(
                            "delete"))
                    {

                        private static final long serialVersionUID = 1L;

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataAction(REMOVE_ACTION, metaData, null);
                            target.addComponent(ajaxPanel);
                        }
                    };

                    deleteLink.add(new Label("deleteLabel", new ResourceModel(
                            "common.delete")));
                    deleteLink.add(new JavascriptEventConfirmation("onclick",
                            new ResourceModel("action.delete.confirm")));
                    listItem.add(deleteLink);
                }
            };
            metaDataListView.setOutputMarkupId(true);
            ajaxPanel.setOutputMarkupId(true);
            ajaxPanel.add(metaDataListView);
            Form metaForm = new Form("metaForm");
            add(metaForm);
            add(new AjaxButton("new",new ResourceModel("common.new"),metaForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    metaDataModalWindow
                    .setContent(new MetaDataPanel(metaDataModalWindow
                            .getContentId(),
                            new JetspeedDocumentMetaData("", "", ""),
                            ajaxPanel));
                      metaDataModalWindow.show(target);
                }
            });
            add(ajaxPanel);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.