}
private void appendComboboxAdvanceType(final Listitem listItem) {
final DirectAdvanceAssignment advance = (DirectAdvanceAssignment) listItem
.getValue();
final Combobox comboAdvanceTypes = new Combobox();
final List<AdvanceType> listAdvanceType = manageOrderElementAdvancesModel
.getPossibleAdvanceTypes(advance);
for(AdvanceType advanceType : listAdvanceType){
if (!advanceType.getUnitName().equals(
PredefinedAdvancedTypes.CHILDREN.getTypeName())
&& !advanceType.isQualityForm()
&& !advanceType.isReadOnly()) {
Comboitem comboItem = new Comboitem();
comboItem.setValue(advanceType);
comboItem.setLabel(advanceType.getUnitName());
comboItem.setParent(comboAdvanceTypes);
if ((advance.getAdvanceType() != null)
&& (advance.getAdvanceType().getId().equals(advanceType
.getId()))) {
comboAdvanceTypes.setSelectedItem(comboItem);
}
}
}
comboAdvanceTypes.addEventListener(Events.ON_SELECT,
new EventListener() {
@Override
public void onEvent(Event event) {
setMaxValue(listItem, comboAdvanceTypes);
cleanFields(advance);
setPercentage();
reloadAdvances();
}
});
Util.bind(comboAdvanceTypes,
new Util.Getter<Comboitem>() {
@Override
public Comboitem get(){
return comboAdvanceTypes.getSelectedItem();
}
}, new Util.Setter<Comboitem>() {
@Override
public void set(Comboitem comboItem) {
if(((comboItem!=null))&&(comboItem.getValue() != null)&&