package jwebform.integration.bean2form;

import java.util.Optional;
import jwebform.FormResult;
import jwebform.field.structure.Field;
import jwebform.field.structure.FieldResult;
import jwebform.processor.FieldResults;
import jwebform.model.FormModelBuilder;

public class FormResultWithBean extends FormResult {


  public FormResultWithBean(String formId, FieldResults fieldResults, boolean formIsValid, boolean isFirstRun,
      FormModelBuilder viewBuilder, Object bean) {
    super(formId, fieldResults, formIsValid, isFirstRun, viewBuilder);
    /*
     * if (bean instanceof JWebFormBean) { fillBean(bean, ((JWebFormBean) bean).postRun(this)); }
     * else { fillBean(bean, this); }
     */
  }



}

@@ -308,16 +308,45 @@
 sult %7B%0A%0A
+  private final Object bean;%0A
 %0A  publi
@@ -571,16 +571,38 @@
 ilder);%0A
+    this.bean = bean;%0A
     /*%0A 
@@ -749,12 +749,59 @@
 */%0A  %7D%0A%0A
-%0A
+  public Object getBean() %7B%0A    return bean;%0A  %7D
 %0A%7D%0A

Enable access to bean for FormRunner