clear the tagDetails map as well
Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
@@ -142,7 +142,7 @@ public abstract class AbstractTagToken<T extends BaseEntity> implements Serializ
|
||||
|
||||
protected void setContainerPropertValues(final Long tagId, final String tagName, final String tagColor) {
|
||||
final TagData tagData = tagDetails.putIfAbsent(tagId, new TagData(tagId, tagName, tagColor));
|
||||
if(tagData == null){
|
||||
if (tagData == null) {
|
||||
final Item item = container.addItem(tagId);
|
||||
item.getItemProperty("id").setValue(tagId);
|
||||
updateItem(tagName, tagColor, item);
|
||||
|
||||
@@ -121,6 +121,7 @@ public class DistributionTagToken extends AbstractTagToken<DistributionSet> {
|
||||
@Override
|
||||
protected void populateContainer() {
|
||||
container.removeAllItems();
|
||||
tagDetails.clear();
|
||||
for (final DistributionSetTag tag : tagManagement.findAllDistributionSetTags()) {
|
||||
setContainerPropertValues(tag.getId(), tag.getName(), tag.getColour());
|
||||
}
|
||||
|
||||
@@ -120,6 +120,7 @@ public class TargetTagToken extends AbstractTargetTagToken<Target> {
|
||||
@Override
|
||||
protected void populateContainer() {
|
||||
container.removeAllItems();
|
||||
tagDetails.clear();
|
||||
for (final TargetTag tag : tagManagement.findAllTargetTags()) {
|
||||
setContainerPropertValues(tag.getId(), tag.getName(), tag.getColour());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user