Hi,
Let me first describe my scenario: I have two tabs, one displaying a table of user accounts, the other one displaying a table of user groups. Both tables are filled using a BeanItemContainer - one with accounts, one with groups. The groups table displays the number of accounts in a generated column. At the account table I have a generated column too, that creates links that than clicked open a window with group assignment functionality (TwinColSelect).
I pass the account BeanItem to the window and use it as PropertyDataSource for TwinColSelect.
accountGroupSelection = new TwinColSelect();
accountGroupSelection.setCaption("Groups");
accountGroupSelection.setNullSelectionAllowed(true);
accountGroupSelection.setMultiSelect(true);
accountGroupSelection.setImmediate(false);
accountGroupSelection.setWriteThrough(false);
accountGroupSelection.setContainerDataSource(passedGroupsItemContainer);
accountGroupSelection.setItemCaptionPropertyId("name");
accountGroupSelection.setPropertyDataSource(passedAccountItem.getItemProperty("groups"));
The TwinColSelect got the same BeanItemContainer set as ContainerDataSource than the user groups table. This works fine so far.
When updating the group <> account assignment via the TwinColSelect I do:
BeanItem<UserGroup> selectedGroupItem = passedGroupsItemContainer.getItem(selectedGroup);
Property accountsProperty = selectedGroupItem.getItemProperty("accounts");
accountsProperty.setValue(selectedGroup.getAccounts());
The issue I have is that the accounts column isn’t updated after setting new property value. Maybe someone can bring me on the right path with that.
Thanks!
Michael