clear the tagDetails map as well

Signed-off-by: Michael Hirsch <michael.hirsch@bosch-si.com>
This commit is contained in:
Michael Hirsch
2016-08-08 16:15:15 +02:00
parent 88c1253f66
commit adafaa9489
3 changed files with 3 additions and 1 deletions

View File

@@ -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);

View File

@@ -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());
}

View File

@@ -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());
}