public void setValues(FormValue otherValue) { super.setValues(otherValue); setName(otherValue.getName()); } }
public void setValues(FormValue otherValue) { super.setValues(otherValue); setName(otherValue.getName()); } }
public AbstractFormType parseFormPropertyType(FormProperty formProperty) { AbstractFormType formType = null; if ("date".equals(formProperty.getType()) && StringUtils.isNotEmpty(formProperty.getDatePattern())) { formType = new DateFormType(formProperty.getDatePattern()); } else if ("enum".equals(formProperty.getType())) { // ACT-1023: Using linked hashmap to preserve the order in which the entries are defined Map<String, String> values = new LinkedHashMap<>(); for (FormValue formValue : formProperty.getFormValues()) { values.put(formValue.getId(), formValue.getName()); } formType = new EnumFormType(values); } else if (StringUtils.isNotEmpty(formProperty.getType())) { formType = formTypes.get(formProperty.getType()); if (formType == null) { throw new ActivitiIllegalArgumentException("unknown type '" + formProperty.getType() + "' " + formProperty.getId()); } } return formType; } }
public AbstractFormType parseFormPropertyType(FormProperty formProperty) { AbstractFormType formType = null; if ("date".equals(formProperty.getType()) && StringUtils.isNotEmpty(formProperty.getDatePattern())) { formType = new DateFormType(formProperty.getDatePattern()); } else if ("enum".equals(formProperty.getType())) { // ACT-1023: Using linked hashmap to preserve the order in which the // entries are defined Map<String, String> values = new LinkedHashMap<>(); for (FormValue formValue : formProperty.getFormValues()) { values.put(formValue.getId(), formValue.getName()); } formType = new EnumFormType(values); } else if (StringUtils.isNotEmpty(formProperty.getType())) { formType = formTypes.get(formProperty.getType()); if (formType == null) { throw new FlowableIllegalArgumentException("unknown type '" + formProperty.getType() + "' " + formProperty.getId()); } } return formType; } }
for (FormValue formValue : property.getFormValues()) { ObjectNode valueNode = objectMapper.createObjectNode(); valueNode.put(PROPERTY_FORM_ENUM_VALUES_NAME, formValue.getName()); valueNode.put(PROPERTY_FORM_ENUM_VALUES_ID, formValue.getId()); valuesNode.add(valueNode);
xtw.writeStartElement(FLOWABLE_EXTENSIONS_PREFIX, ELEMENT_VALUE, FLOWABLE_EXTENSIONS_NAMESPACE); xtw.writeAttribute(ATTRIBUTE_ID, formValue.getId()); xtw.writeAttribute(ATTRIBUTE_NAME, formValue.getName()); xtw.writeEndElement();