ItEr28S11AltaEtiquetasTipoEtiquetaItEr27S11: [FixBug] Add Label to label list when assigning new Label
This commit is contained in:
parent
ec209c07fe
commit
92b78b1ed1
1 changed files with 14 additions and 0 deletions
|
|
@ -220,6 +220,7 @@ public class AssignedLabelsToOrderElementController extends
|
|||
.findLabelByNameAndType(labelName, labelType);
|
||||
if (label == null) {
|
||||
label = createLabel(labelName, labelType);
|
||||
addLabel(label);
|
||||
} else {
|
||||
// Label is already assigned?
|
||||
if (isAssigned(label)) {
|
||||
|
|
@ -231,6 +232,19 @@ public class AssignedLabelsToOrderElementController extends
|
|||
clear(txtLabelName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add {@link Label} to {@link Bandbox} list when assigning new label
|
||||
*
|
||||
* @param label
|
||||
*/
|
||||
private void addLabel(Label label) {
|
||||
List<Label> labels = (List<Label>) bdLabels.getVariable("allLabels",
|
||||
true);
|
||||
labels.add(label);
|
||||
bdLabels.setVariable("allLabels", labels, true);
|
||||
Util.reloadBindings(lbLabels);
|
||||
}
|
||||
|
||||
private void clear(Textbox textbox) {
|
||||
textbox.setValue("");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue