summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java6
-rw-r--r--modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java5
2 files changed, 7 insertions, 4 deletions
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
index 538aa7f..bb48f39 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryConfigurationStep.java
@@ -127,13 +127,13 @@ public class ResourceFactoryConfigurationStep extends AbstractWizardStep impleme
@Override
public boolean isNextButtonEnabled() {
- return (editor != null) && editor.isValid();
+ return (editor == null) || editor.isValid();
}
public boolean nextPage() {
// Finish.
- if ((editor != null) && editor.isValid()) {
- wizard.setNewResourceConfiguration(editor.getConfiguration());
+ if ((editor == null) || editor.isValid()) {
+ wizard.setNewResourceConfiguration(editor == null ? new Configuration() : editor.getConfiguration());
wizard.setNewResourceCreateTimeout(timeoutItem.getValueAsInteger());
wizard.execute();
return true;
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
index 6477ad6..1482fd8 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/resource/factory/ResourceFactoryCreateWizard.java
@@ -62,7 +62,10 @@ public class ResourceFactoryCreateWizard extends AbstractResourceFactoryWizard {
ConfigurationDefinition deployTimeConfigDef = packageType.getDeploymentConfigurationDefinition();
this.setNewResourceConfigurationDefinition(deployTimeConfigDef);
- Map<String, ConfigurationTemplate> templates = deployTimeConfigDef.getTemplates();
+ Map<String, ConfigurationTemplate> templates = Collections.emptyMap();
+ if (deployTimeConfigDef != null) {
+ templates = deployTimeConfigDef.getTemplates();
+ }
steps.add(new ResourceFactoryInfoStep(ResourceFactoryCreateWizard.this, null, MSG
.widget_resourceFactoryWizard_versionPrompt(), archPrompt, MSG