From a79af41b9c672ba98a9d62d6210c4a1276d418ab Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 17 Aug 2007 15:21:38 +0000
Subject: [PATCH] Fix a ClassCastException with Message objects in the Security Options dialog of the installer. Fix a bug that made the label of the server location not to appear as invalid when we detected that the installation path was not valid. Fix a bug in UIFactory so that the invalid labels have again a red color.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java |    2 +-
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/ServerSettingsPanel.java   |    1 +
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java                       |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java
index 6ea1172..a10e73d 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/SecurityOptionsDialog.java
@@ -681,7 +681,7 @@
             ArrayList<Message> errorMsgs = new ArrayList<Message>();
             for (Object o: ar)
             {
-              errorMsgs.add(Message.raw((String)o));
+              errorMsgs.add((Message)o);
             }
             displayError(Utils.getMessageFromCollection(errorMsgs, "\n"),
                 INFO_ERROR_TITLE.get());
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/ServerSettingsPanel.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/ServerSettingsPanel.java
index 448a76d..12d43ea 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/ServerSettingsPanel.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/installer/ui/ServerSettingsPanel.java
@@ -498,6 +498,7 @@
     lServerLocation = UIFactory.makeJLabel(desc);
     tfServerLocationParent = UIFactory.makeJTextComponent(desc, "");
     lServerLocation.setLabelFor(tfServerLocationParent);
+    hmLabels.put(FieldName.SERVER_LOCATION, lServerLocation);
 
     desc =
         new LabelFieldDescriptor(INFO_SERVER_LOCATION_LABEL.get(),
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
index b5505b6..f0b345d 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
@@ -290,7 +290,7 @@
    * Specifies the invalid field color.
    */
   public static final Color FIELD_INVALID_COLOR =
-          getColor(INFO_FIELD_VALID_COLOR.get());
+          getColor(INFO_FIELD_INVALID_COLOR.get());
 
   /**
    * Specifies the read only text color.

--
Gitblit v1.10.0