ItEr19S11CUAsignacionRecursosEspecificosAPlanificacionItEr18S14: Showing a message when the criterions list is empty during the resource allocation.

This commit is contained in:
Manuel Rego Casasnovas 2009-07-28 08:21:21 +02:00 committed by Javier Moran Rua
parent 9909aef738
commit 72aa2b07d0
2 changed files with 11 additions and 1 deletions

View file

@ -46,7 +46,16 @@ public class ResourceAllocationController extends GenericForwardComposer {
private Window window;
public Set<Criterion> getCriterions() {
return resourceAllocationModel.getCriterions();
Set<Criterion> criterions = resourceAllocationModel.getCriterions();
if (criterions.isEmpty()) {
window.getFellow("requiredCriterions").setVisible(false);
window.getFellow("requiredCriterionsEmpty").setVisible(true);
} else {
window.getFellow("requiredCriterionsEmpty").setVisible(false);
window.getFellow("requiredCriterions").setVisible(true);
}
return criterions;
}
public Set<ResourceAllocation> getResourceAllocations() {

View file

@ -51,6 +51,7 @@
<listcell label="@{criterion.name}"></listcell>
</listitem>
</listbox>
<label id="requiredCriterionsEmpty" value="None" visible="false" />
<hbox>
<button id="addResourceAllocation" label="Add"
onClick="allocationController.addResourceAllocation();" />