Package org.apache.isis.core.metamodel.facets.members.cssclass

Examples of org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet


        buildGui();
    }

    private void buildGui() {
        final EntityModel model = getModel();
        final CssClassFacet facet = model.getObject().getSpecification().getFacet(CssClassFacet.class);
        if(facet != null) {
            this.add(new CssClassAppender(facet.value()));
        }

        addOrReplace(ComponentType.ENTITY_SUMMARY, model);
       
        getComponentFactoryRegistry().addOrReplaceComponent(this, ID_ENTITY_PROPERTIES_AND_COLLECTIONS, ComponentType.ENTITY_PROPERTIES, model);
View Full Code Here


    private void addCollectionToForm(final EntityModel entityModel,
      final ObjectAssociation association,
      final WebMarkupContainer collectionRvContainer) {

        final CssClassFacet facet = association.getFacet(CssClassFacet.class);
        if(facet != null) {
            collectionRvContainer.add(new CssClassAppender(facet.value()));
        }
        final WebMarkupContainer fieldset = new WebMarkupContainer(ID_COLLECTION_GROUP);
        collectionRvContainer.add(fieldset);
       
        final String name = association.getName();
View Full Code Here

        return helpFacet == null ? null : helpFacet.value();
    }

    @Override
    public String getCssClass() {
        final CssClassFacet cssClassFacet = getFacet(CssClassFacet.class);
        return cssClassFacet == null ? null : cssClassFacet.value();
    }
View Full Code Here

        if (cssForMetaModel != null) {
            add(new AttributeAppender("class", Model.of(cssForMetaModel), " "));
        }

        ScalarModel model = getModel();
        final CssClassFacet facet = model.getFacet(CssClassFacet.class);
        if(facet != null) {
              add(new CssClassAppender(facet.value()));
        }
    }
View Full Code Here

        final String reasonDisabledIfAny = usability.getReason();
       
        final DescribedAsFacet describedAsFacet = objectAction.getFacet(DescribedAsFacet.class);
        final String descriptionIfAny = describedAsFacet != null? describedAsFacet.value(): null;
       
        final CssClassFacet cssClassFacet = objectAction.getFacet(CssClassFacet.class);

        final boolean blobOrClob = returnsBlobOrClob(objectAction);
        final boolean prototype = isExplorationOrPrototype(objectAction);
        final String actionIdentifier = actionIdentifierFor(objectAction);

        Builder builder = newSubMenuItem(actionLabel)
                .link(link)
                .describedAs(descriptionIfAny)
                .enabled(reasonDisabledIfAny)
                .returnsBlobOrClob(blobOrClob)
                .prototyping(prototype)
                .withActionIdentifier(actionIdentifier);
        if (cssClassFacet != null) {
            builder.withCssClass(cssClassFacet.value());
        }
        return builder;
    }
View Full Code Here

        final String actionId = action.getId();
        return className + "-" + actionId;
    }

    public static String cssClassFor(ObjectAction action) {
        CssClassFacet cssClassFacet = action.getFacet(CssClassFacet.class);
        return cssClassFacet != null ? cssClassFacet.value() : null;
    }
View Full Code Here

        final AbstractLink link = linkAndLabel.getLink();
        final String actionLabel = linkAndLabel.getLabel();
        Builder builder = this.newSubMenuItem(actionLabel).link(link).prototyping(linkAndLabel.isPrototype());

        CssClassFacet cssClassFacet = objectAction.getFacet(CssClassFacet.class);
        if (cssClassFacet != null) {
            builder.withCssClass(cssClassFacet.value());
        }
        return builder;
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.members.cssclass.CssClassFacet

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.