Package org.apache.wicket.markup.html.panel

Examples of org.apache.wicket.markup.html.panel.Fragment


        editProfileModalWin.setInitialHeight(SELF_REG_WIN_HEIGHT);
        editProfileModalWin.setInitialWidth(SELF_REG_WIN_WIDTH);
        editProfileModalWin.setCookieName("self-reg-modal");
        add(editProfileModalWin);

        Fragment selfRegFrag;
        if (isSelfRegistrationAllowed()) {
            selfRegFrag = new Fragment("selfRegistration", "selfRegAllowed", this);

            final AjaxLink selfRegLink = new IndicatingAjaxLink("link") {

                private static final long serialVersionUID = -7978723352517770644L;

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

                        private static final long serialVersionUID = -7834632442532690940L;

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

                    editProfileModalWin.show(target);
                }
            };
            selfRegLink.add(new Label("linkTitle", getString("selfRegistration")));

            Panel panel = new LinkPanel("selfRegistration", new ResourceModel("selfRegistration"));
            panel.add(selfRegLink);
            selfRegFrag.add(panel);
        } else {
            selfRegFrag = new Fragment("selfRegistration", "selfRegNotAllowed", this);
        }
        add(selfRegFrag);
    }
View Full Code Here


        this.window = window;
        this.userTO = userTO;
        this.mode = mode;
        this.resetPassword = resetPassword;

        fragment = new Fragment("userModalFrag", "userModalEditFrag", this);
        fragment.setOutputMarkupId(true);
        add(fragment);
    }
View Full Code Here

        this.window = window;
        this.mode = mode;
        this.userTO = userTO;
        this.resetPassword = false;

        fragment = new Fragment("userModalFrag", "userModalResultFrag", this);
        fragment.setOutputMarkupId(true);
        add(fragment);

        final UserManagementResultPanel result = new UserManagementResultPanel("userModalPageResult", window, mode,
                userTO);
View Full Code Here

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

        final Fragment fragment = new Fragment("userModalResultFrag", mode == UserModalPage.Mode.SELF
                ? "userModalSelfResultFrag"
                : "userModalPropagationResultFrag", this);

        fragment.setOutputMarkupId(true);
        container.add(fragment);

        if (mode == UserModalPage.Mode.ADMIN) {

            // add Syncope propagation status
            PropagationTO syncope = new PropagationTO();
            syncope.setResourceName("Syncope");
            syncope.setStatus(PropagationTaskExecStatus.SUCCESS);

            List<PropagationTO> propagations = new ArrayList<PropagationTO>();
            propagations.add(syncope);
            propagations.addAll(userTO.getPropagationTOs());

            fragment.add(new Label("userInfo", userTO.getUsername() != null
                    ? userTO.getUsername()
                    : String.valueOf(userTO.getId())));

            final ListView<PropagationTO> propRes = new ListView<PropagationTO>("resources", propagations) {

                private static final long serialVersionUID = -1020475259727720708L;

                @Override
                protected void populateItem(final ListItem item) {
                    final PropagationTO propTO = (PropagationTO) item.getDefaultModelObject();

                    final ListView attributes = getConnObjectView(propTO);

                    final Fragment attrhead;

                    if (attributes.getModelObject() != null && !attributes.getModelObject().isEmpty()) {
                        attrhead = new Fragment("attrhead", "attrHeadFrag", panel);
                    } else {
                        attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", panel);
                    }

                    item.add(attrhead);
                    item.add(attributes);

                    attrhead.add(new Label("resource", propTO.getResourceName()));

                    attrhead.add(new Label("propagation", propTO.getStatus() != null
                            ? propTO.getStatus().toString()
                            : "UNDEFINED"));

                    final Image image;
                    final String alt, title;

                    switch (propTO.getStatus()) {
                        case SUCCESS:
                        case SUBMITTED:
                        case CREATED:
                            image = new Image("icon", "statuses/active.png");
                            alt = "success icon";
                            title = "success";
                            break;
                        default:
                            image = new Image("icon", "statuses/inactive.png");
                            alt = "failure icon";
                            title = "failure";
                    }

                    image.add(new Behavior() {

                        private static final long serialVersionUID = 1469628524240283489L;

                        @Override
                        public void onComponentTag(final Component component, final ComponentTag tag) {
                            tag.put("alt", alt);
                            tag.put("title", title);
                        }
                    });

                    attrhead.add(image);
                }
            };
            fragment.add(propRes);
        }
View Full Code Here

            @Override
            protected void populateItem(final ListItem item) {
                String name = item.getModelObject().toString();

                final Fragment beforeValue;
                final Fragment afterValue;

                if ("__ENABLE__".equals(name)) {
                    beforeValue = getStatusIcon("beforeValue", before);
                    afterValue = getStatusIcon("afterValue", after);
                } else {
View Full Code Here

            public void onComponentTag(final Component component, final ComponentTag tag) {
                tag.put("title", value);
            }
        });

        final Fragment frag = new Fragment(id, "attrValueFrag", this);
        frag.add(label);

        return frag;
    }
View Full Code Here

                image = null;
                alt = null;
                title = null;
        }

        final Fragment frag;

        if (image != null) {
            image.add(new Behavior() {

                private static final long serialVersionUID = 1469628524240283489L;

                @Override
                public void onComponentTag(final Component component, final ComponentTag tag) {
                    tag.put("alt", alt);
                    tag.put("title", title);
                    tag.put("width", "12px");
                    tag.put("height", "12px");
                }
            });

            frag = new Fragment(id, "remoteStatusFrag", this);
            frag.add(image);
        } else {
            frag = new Fragment(id, "emptyFrag", this);
        }

        return frag;
    }
View Full Code Here

    public TreeActionLinkPanel(final String id, final long idRole, final ModalWindow window,
            final PageReference pageRef) {

        super(id);

        fragment = new Fragment("menuPanel", idRole == 0
                ? "fakerootFrag"
                : "roleFrag", this);

        fragment.setOutputMarkupId(true);
View Full Code Here

                this.selectedNode = null;
                builder.selectedNodeId = null;
            }
        }

        fragment = new Fragment("roleSummaryPanel", builder.selectedNodeId == null ? "fakerootFrag"
                : (builder.selectedNodeId == 0 ? "rootPanel" : "roleViewPanel"), this);

        if (builder.selectedNodeId != null) {
            if (builder.selectedNodeId == 0) {
                actionLink = new TreeActionLinkPanel("actionLink", builder.selectedNodeId,
View Full Code Here

            }
        };
        dgroup.add(details);

        if (names.getObject() == null || names.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("schemas", "emptyFragment", form);
            form.add(fragment);

            selectedSchemas.clear();
        } else {
            final Fragment fragment = new Fragment("schemas", "sfragment", form);
            form.add(fragment);

            final CheckGroup sgroup = new CheckGroup("sCheckGroup", new PropertyModel(this, "selectedSchemas"));
            fragment.add(sgroup);

            final ListView<String> schemas = new ListView<String>("schemas", names) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("scheck", item.getModel()));
                    item.add(new Label("sname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            sgroup.add(schemas);
        }

        if (dsnames.getObject() == null || dsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("dschemas", "emptyFragment", form);
            form.add(fragment);

            selectedDerSchemas.clear();
        } else {
            final Fragment fragment = new Fragment("dschemas", "dsfragment", form);
            form.add(fragment);

            final CheckGroup dsgroup = new CheckGroup("dsCheckGroup", new PropertyModel(this, "selectedDerSchemas"));
            fragment.add(dsgroup);

            final ListView<String> derSchemas = new ListView<String>("derSchemas", dsnames) {

                private static final long serialVersionUID = 9101744072914090143L;

                @Override
                protected void populateItem(ListItem<String> item) {
                    item.add(new Check("dscheck", item.getModel()));
                    item.add(new Label("dsname", new ResourceModel(item.getModelObject(), item.getModelObject())));
                }
            };
            dsgroup.add(derSchemas);
        }

        if (vsnames.getObject() == null || vsnames.getObject().isEmpty()) {
            final Fragment fragment = new Fragment("vschemas", "emptyFragment", form);
            form.add(fragment);

            selectedVirSchemas.clear();
        } else {
            final Fragment fragment = new Fragment("vschemas", "vsfragment", form);
            form.add(fragment);

            final CheckGroup vsgroup = new CheckGroup("vsCheckGroup", new PropertyModel(this, "selectedVirSchemas"));
            fragment.add(vsgroup);

            final ListView<String> virSchemas = new ListView<String>("virSchemas", vsnames) {

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

TOP

Related Classes of org.apache.wicket.markup.html.panel.Fragment

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.