Package org.broadleafcommerce.common.presentation

Examples of org.broadleafcommerce.common.presentation.AdminPresentationToOneLookup


    }

    protected void buildAdminPresentationToOneLookupOverride(Map<String, FieldMetadata> mergedProperties, Map<String, AdminPresentationToOneLookupOverride> presentationOverrides, String propertyName, String key) {
        AdminPresentationToOneLookupOverride override = presentationOverrides.get(propertyName);
        if (override != null) {
            AdminPresentationToOneLookup annot = override.value();
            if (annot != null) {
                if (!(mergedProperties.get(key) instanceof BasicFieldMetadata)) {
                    return;
                }
                BasicFieldMetadata metadata = (BasicFieldMetadata) mergedProperties.get(key);
                metadata.setFieldType(SupportedFieldType.ADDITIONAL_FOREIGN_KEY);
                metadata.setExplicitFieldType(SupportedFieldType.ADDITIONAL_FOREIGN_KEY);
                metadata.setLookupDisplayProperty(annot.lookupDisplayProperty());
                metadata.setForcePopulateChildProperties(annot.forcePopulateChildProperties());
                metadata.setEnableTypeaheadLookup(annot.enableTypeaheadLookup());
                if (!StringUtils.isEmpty(annot.lookupDisplayProperty())) {
                    metadata.setForeignKeyDisplayValueProperty(annot.lookupDisplayProperty());
                }
                metadata.setCustomCriteria(annot.customCriteria());
                metadata.setUseServerSideInspectionCache(annot.useServerSideInspectionCache());
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.common.presentation.AdminPresentationToOneLookup

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.