ItEr35S09CUConfiguracionMaquinasItEr34S09: Fixed problem adding criterion requirements to new configuration units

This commit is contained in:
Lorenzo Tilve 2009-11-25 17:14:50 +01:00 committed by Javier Moran Rua
parent 647f043ac3
commit 5da3d778f3
2 changed files with 4 additions and 11 deletions

View file

@ -145,18 +145,11 @@ public class MachineConfigurationController extends GenericForwardComposer {
return repeated;
}
public void addCriterionRequirement(Button button) {
public void addCriterionRequirement(MachineWorkersConfigurationUnit unit,
Button button) {
Bandbox bandbox = (Bandbox) button.getPreviousSibling();
Listitem item = ((Listbox) bandbox.getFirstChild().getFirstChild())
.getSelectedItem();
MachineWorkersConfigurationUnit unit = null;
String unitString = ((Textbox) bandbox.getPreviousSibling()).getValue();
try {
unit = machineModel.getConfigurationUnitById(Long
.valueOf(unitString));
} catch (InstanceNotFoundException e) {
LOG.error("Configuration unit not found", e);
}
if (item != null) {
CriterionWithItsType criterionAndType = (CriterionWithItsType) item
.getValue();

View file

@ -95,8 +95,8 @@
</bandpopup>
</bandbox>
<button label="${i18n:_('Add new criterion requirement')}"
onClick="configurationController.addCriterionRequirement(self)" />
<button label="${i18n:_('Add new criterion requirement')}"
onClick="configurationController.addCriterionRequirement(self.parent.parent.value,self)" />
<panel title="${i18n:_('Criterion requirements')}" border="normal">
<panelchildren>