ItEr35S09CUConfiguracionMaquinasItEr34S09: Fixed problem adding criterion requirements to new configuration units
This commit is contained in:
parent
647f043ac3
commit
5da3d778f3
2 changed files with 4 additions and 11 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue