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

import de.ivu.elect.business.stimmzettel.entity.Stimmzettel;
import de.ivu.elect.jee.presentation.dynamicform.FormBuilder;
import de.ivu.elect.presentation.ViewFormBuilder;

import javax.inject.Inject;

public class StimmzettelViewFormBuilder extends ViewFormBuilder {

  private static final long serialVersionUID = 1L;

  @Inject
  private transient StimmzettelUniqueUKFacesValidator stimmzettelUniqueUKFacesValidator;

  public StimmzettelViewFormBuilder() {
    super();
  }

  public void addProperties(FormBuilder formBuilder, Stimmzettel stimmzettel) {
    formBuilder.addProperty(stimmzettel.getProperties().getNummerProperty()).withValidatorAndPk(stimmzettelUniqueUKFacesValidator, stimmzettel.getPk());

  }

}
