private void initForms() {
   FormConfigEntity config = getDao().getFormConfigDao().getConfig();
   if (config.getId() == null) {
     config.setFormTemplate(loadResource(FORM_TEMPLATE_FILE));
     config.setLetterTemplate(loadResource(FORM_LETTER_FILE));
     getDao().getFormConfigDao().save(config);
   }
 }
Example #2
0
 public void testGetConfig() {
   FormConfigEntity c = getDao().getFormConfigDao().getConfig();
   assertNotNull(c);
   c.setFormTemplate("template");
   getDao().getFormConfigDao().save(c);
   c = getDao().getFormConfigDao().getConfig();
   assertEquals("template", c.getFormTemplate());
   c.setFormTemplate("template2");
   getDao().getFormConfigDao().save(c);
   c = getDao().getFormConfigDao().getConfig();
   assertEquals("template2", c.getFormTemplate());
 }