
package de.ivu.elect.presentation.wahl.form;

import javax.enterprise.inject.Specializes;

import de.ivu.elect.business.wahl.entity.Wahlart;
import de.ivu.elect.jee.presentation.dynamicform.FormBuilder;

@Specializes
public class NlCommonWahlartViewFormBuilder extends CommonWahlartViewFormBuilder {

  private static final long serialVersionUID = 1L;

  public NlCommonWahlartViewFormBuilder() {
    super();
  }

  @Override
  protected void addNamenProperty(FormBuilder formBuilder, Wahlart wahlart, boolean wahlartNichtAnpassbar) {
    if (wahlart.isPersistent()) {
      super.addNamenProperty(formBuilder, wahlart, true); // Wahlartnamen in de.ivu.elect.business.wahl.entity.NlWahlart festgelegt!
    } else {
      super.addNamenProperty(formBuilder, wahlart, wahlartNichtAnpassbar);
    }
  }
}
