Package org.apache.wicket.markup.html.basic

Examples of org.apache.wicket.markup.html.basic.Label


                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);
View Full Code Here


    }

    public void setupNavigationPanel(final WebPage page, final XMLRolesReader xmlRolesReader, final boolean notsel,
            final String version) {

        page.add(new Label("version", "Console: " + version + "; Core: " + SyncopeSession.get().getCoreVersion()));

        BookmarkablePageLink schemaLink = new BookmarkablePageLink("schema", Schema.class);
        MetaDataRoleAuthorizationStrategy.authorizeAll(schemaLink, WebPage.ENABLE);
        page.add(schemaLink);
        schemaLink.add(new Image("schemaIcon", new ContextRelativeResource(IMG_PREFIX + (notsel
View Full Code Here

        editProfileModalWin.setInitialHeight(EDIT_PROFILE_WIN_HEIGHT);
        editProfileModalWin.setInitialWidth(EDIT_PROFILE_WIN_WIDTH);
        editProfileModalWin.setCookieName("edit-profile-modal");
        add(editProfileModalWin);

        add(new Label("username", SyncopeSession.get().getUserId()));

        Fragment editProfileFrag;
        if ("admin".equals(SyncopeSession.get().getUserId())) {
            editProfileFrag = new Fragment("editProfile", "adminEmptyFrag", this);
        } else {
            final UserTO userTO = SyncopeSession.get().isAuthenticated()
                    ? profileRestClient.readProfile()
                    : new UserTO();

            editProfileFrag = new Fragment("editProfile", "editProfileFrag", this);

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

                private static final long serialVersionUID = -7978723352517770644L;

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

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

                    editProfileModalWin.show(target);
                }
            };
            editProfileLink.add(new Label("linkTitle", getString("editProfile")));

            Panel panel = new LinkPanel("editProfile", new ResourceModel("editProfile"));
            panel.add(editProfileLink);
            editProfileFrag.add(panel);
        }
View Full Code Here

            originalRoleTO = AttributableOperations.clone(roleTO);
        }

        final Form form = new Form("RoleForm");

        add(new Label("displayName", roleTO.getId() == 0 ? "" : roleTO.getDisplayName()));

        form.setModel(new CompoundPropertyModel(roleTO));

        this.rolePanel = new RolePanel("rolePanel", form, roleTO, mode, getPageReference());
        form.add(rolePanel);
View Full Code Here

                                final String componentId, final IModel<AbstractSchemaTO> model) {

                            BeanWrapper bwi = new BeanWrapperImpl(model.getObject());
                            Object obj = bwi.getPropertyValue(field);

                            item.add(new Label(componentId, ""));
                            item.add(new AttributeModifier("class", new Model<String>(obj.toString())));
                        }

                        @Override
                        public String getCssClass() {
View Full Code Here

        super(id);

        this.add(new RoleDetailsPanel("details", roleTO, form, mode == RoleModalPage.Mode.TEMPLATE));

        if (pageref == null || roleTO.getId() == 0) {
            this.add(new Label("statuspanel", ""));
        } else {
            StatusPanel statusPanel = new StatusPanel("statuspanel", roleTO, new ArrayList<StatusBean>(), pageref);
            statusPanel.setOutputMarkupId(true);
            MetaDataRoleAuthorizationStrategy.authorize(
                    statusPanel, RENDER, xmlRolesReader.getAllAllowedRoles("Resources", "getConnectorObject"));
View Full Code Here

            @Override
            protected void populateItem(final ListItem<ConnConfProperty> item) {
                final ConnConfProperty property = item.getModelObject();

                final Label label = new Label("connPropAttrSchema", property.getSchema().getDisplayName() == null
                        || property.getSchema().getDisplayName().isEmpty()
                        ? property.getSchema().getName()
                        : property.getSchema().getDisplayName());

                item.add(label);

                final FieldPanel field;

                boolean required = false;

                boolean isArray = false;

                if (GUARDED_STRING.equalsIgnoreCase(property.getSchema().getType())
                        || GUARDED_BYTE_ARRAY.equalsIgnoreCase(property.getSchema().getType())) {

                    field = new AjaxPasswordFieldPanel("panel", label.getDefaultModelObjectAsString(), new Model());
                    ((PasswordTextField) field.getField()).setResetPassword(false);

                    required = property.getSchema().isRequired();

                } else {
                    Class<?> propertySchemaClass;

                    try {
                        propertySchemaClass = ClassUtils.forName(property.getSchema().getType(), ClassUtils.
                                getDefaultClassLoader());
                    } catch (Exception e) {
                        LOG.error("Error parsing attribute type", e);
                        propertySchemaClass = String.class;
                    }

                    if (NUMBER.contains(propertySchemaClass)) {
                        field = new AjaxNumberFieldPanel("panel", label.getDefaultModelObjectAsString(), new Model(),
                                ClassUtils.resolvePrimitiveIfNecessary(propertySchemaClass));

                        required = property.getSchema().isRequired();
                    } else if (Boolean.class.equals(propertySchemaClass) || boolean.class.equals(propertySchemaClass)) {
                        field = new AjaxCheckBoxPanel("panel", label.getDefaultModelObjectAsString(), new Model());
                    } else {
                        field = new AjaxTextFieldPanel("panel", label.getDefaultModelObjectAsString(), new Model());

                        required = property.getSchema().isRequired();
                    }

                    if (String[].class.equals(propertySchemaClass)) {
View Full Code Here

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

                cellItem.add(new Label(componentId, getString(model.getObject().getType().name())));
            }
        });

        columns.add(new AbstractColumn<PolicyTO, String>(new ResourceModel("actions", "")) {
View Full Code Here

    public void setUserTO(final UserTO userTO) {
        this.userTO = userTO;
    }

    protected Form setupEditPanel() {
        fragment.add(new Label("id", userTO.getId() == 0
                ? ""
                : userTO.getUsername()));

        fragment.add(new Label("new", userTO.getId() == 0
                ? new ResourceModel("new")
                : new Model("")));

        final Form form = new Form("UserForm");
        form.setModel(new CompoundPropertyModel(userTO));

        //--------------------------------
        // User details
        //--------------------------------
        form.add(new UserDetailsPanel("details", userTO, form, resetPassword, mode == Mode.TEMPLATE));

        form.add(new Label("statuspanel", ""));

        form.add(new Label("pwdChangeInfo", ""));

        form.add(new Label("accountinformation", ""));
        //--------------------------------

        //--------------------------------
        // Attributes panel
        //--------------------------------
View Full Code Here

                target.add(reportlets);
            }
        });
        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);
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.basic.Label

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.