}
private void setPercentage(){
if ((this.indexSelectedItem < editAdvances.getItemCount())
&& (this.indexSelectedItem >= 0)) {
Listitem selectedItem = editAdvances.getItemAtIndex(indexSelectedItem);
AdvanceAssignment advanceAssignment = (AdvanceAssignment) selectedItem
.getValue();
DirectAdvanceAssignment directAdvanceAssignment;
if (advanceAssignment instanceof IndirectAdvanceAssignment) {
directAdvanceAssignment = manageOrderElementAdvancesModel
.calculateFakeDirectAdvanceAssignment((IndirectAdvanceAssignment) advanceAssignment);
} else {
directAdvanceAssignment = (DirectAdvanceAssignment) advanceAssignment;
}
final AdvanceMeasurement greatAdvanceMeasurement = this.manageOrderElementAdvancesModel
.getLastAdvanceMeasurement(directAdvanceAssignment);
if (greatAdvanceMeasurement != null) {
Listcell percentage = (Listcell) selectedItem.getChildren()
.get(3);
((Label) percentage.getFirstChild())
.setValue(this.manageOrderElementAdvancesModel
.getPercentageAdvanceMeasurement(
greatAdvanceMeasurement).toString()