ItEr34S13CUAsignacionRecursosEspecificosAPlanificacionItEr33S15: Mark as selected the proper assignment function in the combo.
This commit is contained in:
parent
0b861f21cb
commit
51405319ab
1 changed files with 13 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ import org.apache.commons.lang.Validate;
|
|||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.navalplanner.business.planner.entities.AggregateOfResourceAllocations;
|
||||
import org.navalplanner.business.planner.entities.AssignmentFunction;
|
||||
import org.navalplanner.business.planner.entities.CalculatedValue;
|
||||
import org.navalplanner.business.planner.entities.GenericResourceAllocation;
|
||||
import org.navalplanner.business.planner.entities.ResourceAllocation;
|
||||
|
|
@ -744,18 +745,29 @@ class Row {
|
|||
}
|
||||
|
||||
private Combobox getAssignmentFunctionsCombo() {
|
||||
AssignmentFunction assignmentFunction = getAllocation()
|
||||
.getAssignmentFunction();
|
||||
|
||||
Combobox combobox = new Combobox();
|
||||
combobox.setId("assigment_functions_combo");
|
||||
|
||||
Comboitem comboitem = new Comboitem(_("None"));
|
||||
comboitem.setValue(null);
|
||||
combobox.appendChild(comboitem);
|
||||
combobox.setSelectedItem(comboitem);
|
||||
if (assignmentFunction == null) {
|
||||
combobox.setSelectedItem(comboitem);
|
||||
}
|
||||
|
||||
comboitem = new Comboitem(_("Stretches"));
|
||||
comboitem.setValue(StretchesFunction.class);
|
||||
combobox.appendChild(comboitem);
|
||||
|
||||
if (assignmentFunction != null
|
||||
&& assignmentFunction.getClass()
|
||||
.equals(StretchesFunction.class)) {
|
||||
combobox.setSelectedItem(comboitem);
|
||||
}
|
||||
|
||||
return combobox;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue