Example #1
0
 public void applyFormInstanceData(FormInstance formInstance, ScopeInstanceImpl scopeInstance) {
   if (formInstance != null && formInstance.getFields() != null) {
     for (FormInstanceField field : formInstance.getFields()) {
       Object value = field.getValue();
       FormFieldBinding formFieldBinding = formFieldBindings.get(field.getId());
       if (isWritable(formFieldBinding)) {
         String variableId = formFieldBinding.binding.expression.variableId;
         scopeInstance.setVariableValue(variableId, value);
       }
     }
   }
 }
Example #2
0
 public void deserializeFormInstance(FormInstance formInstance) {
   if (formInstance == null) {
     return;
   }
   if (formInstance.getFields() != null) {
     for (FormInstanceField field : formInstance.getFields()) {
       String fieldId = field.getId();
       FormFieldBinding formFieldBinding = formFieldBindings.get(fieldId);
       if (formFieldBinding != null) {
         formFieldBinding.deserializeFormField(field);
       } else {
         log.debug("Ignoring undefined form field '" + fieldId + "'");
       }
     }
   }
 }