From 247adc2b524e82e284fa74798ea1a21f2d754892 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 06 Jul 2007 18:12:40 +0000
Subject: [PATCH] Add the code required to update the list of steps that appear on the left of the wizard dynamically.
---
opends/src/quicksetup/org/opends/quicksetup/installandupgrader/InstallAndUpgrader.java | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/installandupgrader/InstallAndUpgrader.java b/opends/src/quicksetup/org/opends/quicksetup/installandupgrader/InstallAndUpgrader.java
index 278c852..cd6045a 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/installandupgrader/InstallAndUpgrader.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/installandupgrader/InstallAndUpgrader.java
@@ -310,7 +310,7 @@
/**
* {@inheritDoc}
*/
- public boolean isVisible(WizardStep step)
+ public boolean isVisible(WizardStep step, UserData userData)
{
boolean isVisible;
if (step == Step.WELCOME)
@@ -319,7 +319,8 @@
}
else
{
- isVisible = getDelegateApplication().isVisible(step) &&
+ isVisible = getDelegateApplication().isVisible(step,
+ getDelegateApplication().getUserData()) &&
getDelegateApplication().getWizardSteps().contains(step);
}
return isVisible;
@@ -328,6 +329,34 @@
/**
* {@inheritDoc}
*/
+ public boolean isVisible(WizardStep step, QuickSetup qs)
+ {
+ boolean isVisible;
+ if (step == Step.WELCOME)
+ {
+ isVisible = true;
+ }
+ else
+ {
+ GuiApplication appl;
+ Boolean isUpgrade = (Boolean)qs.getFieldValue(FieldName.IS_UPGRADE);
+ if (Boolean.TRUE.equals(isUpgrade))
+ {
+ appl = upgrader;
+ }
+ else
+ {
+ appl = installer;
+ }
+ isVisible = appl.isVisible(step, qs) &&
+ appl.getWizardSteps().contains(step);
+ }
+ return isVisible;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public boolean isSubStep(WizardStep step)
{
boolean isSubStep;
--
Gitblit v1.10.0