Package org.araneaframework.uilib.form.reader

Examples of org.araneaframework.uilib.form.reader.BeanFormWriter


    reader.readFormBean(bean);
    return bean;
  }

  public void writeBean(Object bean) {
    BeanFormWriter writer = new BeanFormWriter(beanClass);
    writer.writeFormBean(this, bean);
  }
View Full Code Here


     */
    public static void writeDtoToForm(Object dto, FormWidget form) {
      if (dto == null)
        throw new NullPointerException("The DTO that is written to the form mustn't be null!");

      BeanFormWriter writer = new BeanFormWriter(dto.getClass());
      writer.writeFormBean(form, dto);
    }
View Full Code Here

    test.setBooleanValue(Boolean.TRUE);
    test.setStringValue(LIFE_IS_BEAUTIFUL);
    test.setLongValue(TEN);

    BeanFormWriter voWriter = new BeanFormWriter(test.getClass());

    voWriter.writeFormBean(voForm, test);

    assertTrue("Boolean value written properly", voForm.getValueByFullName("booleanValue").equals(Boolean.TRUE));
    assertTrue("String value written properly", voForm.getValueByFullName("stringValue").equals(LIFE_IS_BEAUTIFUL));
    assertTrue("Long value written properly", voForm.getValueByFullName("longValue").equals(TEN));
  }
View Full Code Here

    test.getSubTestVO().setBooleanValue(Boolean.TRUE);
    test.getSubTestVO().setStringValue(LIFE_IS_BEAUTIFUL);
    test.getSubTestVO().setLongValue(TEN);

    BeanFormWriter voWriter = new BeanFormWriter(test.getClass());

    voWriter.writeFormBean(voForm, test);

    assertTrue("Boolean value written properly", voForm.getValueByFullName("subTestVO.booleanValue").equals(Boolean.TRUE));
    assertTrue("String value written properly", voForm.getValueByFullName("subTestVO.stringValue").equals(LIFE_IS_BEAUTIFUL));
    assertTrue("Long value written properly", voForm.getValueByFullName("subTestVO.longValue").equals(TEN))}
View Full Code Here

TOP

Related Classes of org.araneaframework.uilib.form.reader.BeanFormWriter

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.