Skip to content

Commit

Permalink
Fixed GUI problem with associations added at the same time when an ac…
Browse files Browse the repository at this point in the history
…count is created
  • Loading branch information
semancik committed Dec 16, 2015
1 parent 454897b commit 40ae558
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
Expand Up @@ -776,6 +776,20 @@ private ObjectDelta createAddingObjectDelta() throws SchemaException {
Collections.sort(containers, new PathSizeComparator());

for (ContainerWrapper containerWrapper : getContainers()) {

if (containerWrapper.getItemDefinition().getName().equals(ShadowType.F_ASSOCIATION)) {
PrismContainer associationContainer = object.findOrCreateContainer(ShadowType.F_ASSOCIATION);
List<AssociationWrapper> associationItemWrappers = (List<AssociationWrapper>) containerWrapper.getItems();
for (AssociationWrapper associationItemWrapper : associationItemWrappers) {
List<ValueWrapper> assocValueWrappers = associationItemWrapper.getValues();
for (ValueWrapper assocValueWrapper: assocValueWrappers) {
PrismContainerValue<ShadowAssociationType> assocValue = (PrismContainerValue<ShadowAssociationType>) assocValueWrapper.getValue();
associationContainer.add(assocValue.clone());
}
}
continue;
}

if (!containerWrapper.hasChanged()) {
continue;
}
Expand Down
Expand Up @@ -1165,15 +1165,16 @@ private List<ObjectDelta<? extends ObjectType>> modifyShadows(OperationResult re
List<FocusProjectionDto> accounts = getFocusShadows();
OperationResult subResult = null;
for (FocusProjectionDto account : accounts) {
if (!account.isLoadedOK())
if (!account.isLoadedOK()) {
continue;
}

try {
ObjectWrapper accountWrapper = account.getObject();
ObjectDelta delta = accountWrapper.getObjectDelta();
if (LOGGER.isTraceEnabled()) {
LOGGER.trace("Account delta computed from form:\n{}",
new Object[] { delta.debugDump(3) });
LOGGER.trace("Account delta computed from {} as:\n{}",
new Object[] { accountWrapper, delta.debugDump(3) });
}

if (!UserDtoStatus.MODIFY.equals(account.getStatus())) {
Expand Down

0 comments on commit 40ae558

Please sign in to comment.