Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Dec 12, 2014
2 parents eeca406 + 2c37a39 commit 70497fd
Showing 1 changed file with 13 additions and 9 deletions.
Expand Up @@ -395,10 +395,20 @@ public void applyState() {

try {
PrismObject<ResourceType> resource = resourceModel.getObject();

if(StringUtils.isNotEmpty(resource.getOid())){
newResource = false;
} else {
newResource = true;
}

page.getPrismContext().adopt(resource);
resource.findOrCreateContainer(ResourceType.F_CONNECTOR_CONFIGURATION)
.findOrCreateContainer(SchemaConstants.ICF_CONFIGURATION_PROPERTIES)
.createNewValue();

if(newResource){
resource.findOrCreateContainer(ResourceType.F_CONNECTOR_CONFIGURATION)
.findOrCreateContainer(SchemaConstants.ICF_CONFIGURATION_PROPERTIES)
.createNewValue();
}

DropDownFormGroup connectorTypeDropDown = ((DropDownFormGroup)get(ID_CONNECTOR_TYPE));
if(connectorTypeDropDown != null && connectorTypeDropDown.getInput() != null){
Expand All @@ -417,12 +427,6 @@ public void applyState() {
}
}

if(StringUtils.isNotEmpty(resource.getOid())){
newResource = false;
} else {
newResource = true;
}

ObjectDelta delta;
if (!newResource) {
PrismObject<ResourceType> oldResource = WebModelUtils.loadObject(ResourceType.class, resource.getOid(),
Expand Down

0 comments on commit 70497fd

Please sign in to comment.