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

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


        this.bulkActionForm = null;
        this.group = null;
        dataTable = new AjaxFallbackDefaultDataTable("dataTable", columns, dataProvider, rowsPerPage);

        Fragment fragment = new Fragment("tablePanel", "bulkNotAvailable", this);
        fragment.add(dataTable);

        add(fragment);
    }
View Full Code Here


                    target.add(page.getFeedbackPanel());
                }
            }
        });

        Fragment fragment = new Fragment("tablePanel", "bulkAvailable", this);
        add(fragment);

        bulkActionForm = new Form("groupForm");
        fragment.add(bulkActionForm);

        group = new CheckGroup<T>("checkgroup", new ArrayList<T>());
        bulkActionForm.add(group);

        columns.add(0, new CheckGroupColumn<T, S>(group));
        dataTable = new AjaxFallbackDefaultDataTable("dataTable", columns, dataProvider, rowsPerPage);
        group.add(dataTable);

        fragment.add(new ClearIndicatingAjaxButton("bulkActionLink", bulkActionForm, pageRef) {
            private static final long serialVersionUID = 382302811235019988L;

            @Override
            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                bulkModalWin.setPageCreator(new ModalWindow.PageCreator() {
View Full Code Here

        super(id, model);

        this.id = id;
        this.name = name;

        final Fragment fragment = new Fragment("required", "notRequiredFragment", this);
        add(fragment);

        setOutputMarkupId(true);
    }
View Full Code Here

    public FieldPanel addRequiredLabel() {
        if (!isRequired()) {
            setRequired(true);
        }

        final Fragment fragment = new Fragment("required", "requiredFragment", this);

        fragment.add(new Label("requiredLabel", "*"));

        replace(fragment);

        this.isRequiredLabelAdded = true;

View Full Code Here

    public FieldPanel removeRequiredLabel() {
        if (isRequired()) {
            setRequired(false);
        }

        final Fragment fragment = new Fragment("required", "notRequiredFragment", this);

        replace(fragment);

        this.isRequiredLabelAdded = false;
View Full Code Here

                } else {
                    minus.setVisible(true);
                    minus.setEnabled(true);
                }

                final Fragment fragment;
                if (item.getIndex() == model.getObject().size() - 1) {
                    final AjaxLink plus = new IndicatingAjaxLink("add") {

                        private static final long serialVersionUID = -7978723352517770644L;

                        @Override
                        public void onClick(final AjaxRequestTarget target) {
                            //Add current component
                            model.getObject().add(null);
                            target.add(container);
                        }
                    };

                    fragment = new Fragment("panelPlus", "fragmentPlus", container);

                    fragment.add(plus);
                } else {
                    fragment = new Fragment("panelPlus", "emptyFragment", container);
                }
                item.add(fragment);
            }
        };
View Full Code Here

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

        final Fragment fragment = new Fragment("resultFrag", mode == UserModalPage.Mode.SELF
                ? "userRequestResultFrag"
                : "propagationResultFrag", this);
        fragment.setOutputMarkupId(true);
        container.add(fragment);

        if (mode == UserModalPage.Mode.ADMIN) {
            // add Syncope propagation status
            PropagationStatusTO syncope = new PropagationStatusTO();
            syncope.setResource("Syncope");
            syncope.setStatus(PropagationTaskExecStatus.SUCCESS);

            List<PropagationStatusTO> propagations = new ArrayList<PropagationStatusTO>();
            propagations.add(syncope);
            propagations.addAll(attributable.getPropagationStatusTOs());

            fragment.add(new Label("info",
                    ((attributable instanceof UserTO) && ((UserTO) attributable).getUsername() != null)
                    ? ((UserTO) attributable).getUsername()
                    : ((attributable instanceof RoleTO) && ((RoleTO) attributable).getName() != null)
                    ? ((RoleTO) attributable).getName()
                    : String.valueOf(attributable.getId())));

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

                private static final long serialVersionUID = -1020475259727720708L;

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

                    final ListView attributes = getConnObjectView(propTO);

                    final Fragment attrhead;
                    if (attributes.getModelObject() == null || attributes.getModelObject().isEmpty()) {
                        attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", page);
                    } else {
                        attrhead = new Fragment("attrhead", "attrHeadFrag", page);
                    }

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

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

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

                    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", propTO.getResource(), before);
                    afterValue = getStatusIcon("afterValue", propTO.getResource(), after);
                } else {
                    beforeValue = getLabelValue("beforeValue", name, beforeAttrMap);
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) {
            frag = new Fragment(id, "emptyFrag", this);
        } else {
            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);
        }

        return frag;
    }
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.