this.applicationContext = applicationContext;
}
@Override
public FieldWrapper buildFields() {
FieldWrapper wrapper = new FieldWrapper();
for (FieldData field : getFields()) {
FieldDTO fieldDTO = new FieldDTO();
fieldDTO.setLabel(field.getFieldLabel());
//translate the label to display
String label = field.getFieldLabel();
BroadleafRequestContext context = BroadleafRequestContext.getBroadleafRequestContext();
MessageSource messages = context.getMessageSource();
label = messages.getMessage(label, null, label, context.getJavaLocale());
fieldDTO.setLabel(label);
fieldDTO.setName(field.getFieldName());
fieldDTO.setOperators(field.getOperators());
fieldDTO.setOptions(field.getOptions());
wrapper.getFields().add(fieldDTO);
}
return wrapper;
}