Exemple #1
0
  @Override
  public DDMFormLayout getDefaultDDMFormLayout(DDMForm ddmForm) {
    DDMFormLayout ddmFormLayout = new DDMFormLayout();

    Locale defaultLocale = ddmForm.getDefaultLocale();

    ddmFormLayout.setDefaultLocale(defaultLocale);
    ddmFormLayout.setPaginationMode(DDMFormLayout.SINGLE_PAGE_MODE);

    DDMFormLayoutPage ddmFormLayoutPage = new DDMFormLayoutPage();

    LocalizedValue title = getDefaultDDMFormPageTitle(defaultLocale);

    ddmFormLayoutPage.setTitle(title);

    for (DDMFormField ddmFormField : ddmForm.getDDMFormFields()) {
      ddmFormLayoutPage.addDDMFormLayoutRow(getDefaultDDMFormLayoutRow(ddmFormField));
    }

    ddmFormLayout.addDDMFormLayoutPage(ddmFormLayoutPage);

    return ddmFormLayout;
  }
  protected DDMFormLayoutPage getLastDDMFormLayoutPage(DDMFormLayout ddmFormLayout) {

    List<DDMFormLayoutPage> ddmFormLayoutPages = ddmFormLayout.getDDMFormLayoutPages();

    return ddmFormLayoutPages.get(ddmFormLayoutPages.size() - 1);
  }