use of org.asqatasun.webapp.form.builder.SelectFormFieldBuilderImpl in project Asqatasun by Asqatasun.
the class AbstractAuditSetUpController method getFreshRefAndLevelSetUpFormFieldList.
/**
* Create a fresh list of SelectFormField dedicated to the referential and
* level choice.
* The call of the helper method is due to activation mechanism.
* In this case, the activation of the element is done through the referential
* list associated with the contract
*
* @param authorisedReferentialList
* @param auditSetUpFormFieldBuilderList
* @return
*/
protected List<SelectFormField> getFreshRefAndLevelSetUpFormFieldList(Collection<String> authorisedReferentialList, List<SelectFormFieldBuilderImpl> auditSetUpFormFieldBuilderList) {
List<SelectFormField> selectFormFieldList = new LinkedList();
for (SelectFormFieldBuilderImpl seb : auditSetUpFormFieldBuilderList) {
// Create the SelectElement from the builder
SelectFormField selectFormField = seb.build();
// enable-disable elements from the authorised referentials
AuditSetUpFormFieldHelper.activateAllowedReferentialField(selectFormField, authorisedReferentialList);
// add the fresh instance to the returned list
selectFormFieldList.add(selectFormField);
}
return selectFormFieldList;
}
Aggregations