Package org.broadleafcommerce.openadmin.web.form.entity

Examples of org.broadleafcommerce.openadmin.web.form.entity.EntityForm.findField()


                    } else {
                        LOG.warn("Could not find field " + fieldName + " within the dynamic form " + fieldInfo[0]);
                        addFieldError(fieldName, err.getCode(), tabErrors);
                    }
                } else {
                    Field formField = form.findField(err.getField());
                    if (formField != null) {
                        addFieldError(formField.getFriendlyName(), err.getCode(), tabErrors);
                    } else {
                        LOG.warn("Could not field field " + err.getField() + " within the main form");
                        addFieldError(err.getField(), err.getCode(), tabErrors);
View Full Code Here


        DynamicEntityFormInfo info = new DynamicEntityFormInfo()
                .withCeilingClassName(PageTemplate.class.getName())
                .withSecurityCeilingClassName(Page.class.getName())
                .withCriteriaName("constructForm")
                .withPropertyName("pageTemplate")
                .withPropertyValue(ef.findField("pageTemplate").getValue());
        EntityForm dynamicForm = getDynamicFieldTemplateForm(info, id, null);
        ef.putDynamicFormInfo("pageTemplate", info);
        ef.putDynamicForm("pageTemplate", dynamicForm);
       
        // Mark the field that will drive this dynamic form
View Full Code Here

        DynamicEntityFormInfo info = new DynamicEntityFormInfo()
                .withCeilingClassName(StructuredContentType.class.getName())
                .withSecurityCeilingClassName(StructuredContent.class.getName())
                .withCriteriaName("constructForm")
                .withPropertyName("structuredContentType")
                .withPropertyValue(ef.findField("structuredContentType").getValue());
        EntityForm dynamicForm = getDynamicFieldTemplateForm(info, id, null);
        ef.putDynamicFormInfo("structuredContentType", info);
        ef.putDynamicForm("structuredContentType", dynamicForm);
       
        // We don't want to allow changing types once a structured content item exists
View Full Code Here

            formService.populateEntityFormFields(entityForm, entity);
            formService.populateAdornedEntityFormFields(entityForm, entity, ppr.getAdornedList());
           
            // Set the new sequence (note that it will come in 0-indexed but the persistence module expects 1-indexed)
            int sequenceValue = Integer.parseInt(newSequence) + 1;
            Field field = entityForm.findField(atl.getSortField());
            field.setValue(String.valueOf(sequenceValue));
           
            Map<String, Object> responseMap = new HashMap<String, Object>();
            service.updateSubCollectionEntity(entityForm, mainMetadata, collectionProperty, entity, collectionItemId, sectionCrumbs);
            responseMap.put("status", "ok");
View Full Code Here

     * @AdminPresentation annotation as it is only required when the offer type has a type of {@link OfferType#ORDER_ITEM}.
     */
    protected void modifyModelAttributes(Model model) {
        model.addAttribute("additionalControllerClasses", "offer-form");
        EntityForm form = (EntityForm) model.asMap().get("entityForm");
        form.findField("targetItemCriteria").setRequired(true);
    }
   
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.