modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ConfigurationBean.java
| 7 +++++++
modules/enterprise/gui/installer-war/src/main/webapp/start.jsp
| 5 +++--
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit a580f69b6dbf05df46c766daec53982365dac52e
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue Jun 19 13:15:37 2012 +0200
[BZ 801551] - Make sure the server name is not editable when upgrading
existing server in the installer.
diff --git
a/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ConfigurationBean.java
b/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ConfigurationBean.java
index 2af8f15..e06dbe8 100644
---
a/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ConfigurationBean.java
+++
b/modules/enterprise/gui/installer-war/src/main/java/org/rhq/enterprise/installer/ConfigurationBean.java
@@ -895,6 +895,12 @@ public class ConfigurationBean {
return ((null != registeredServerNames) &&
!registeredServerNames.isEmpty());
}
+ public boolean isInstallationSettingsConfigurable() {
+ String selectedServer = getSelectedRegisteredServerName();
+ return selectedServer == null || selectedServer.isEmpty()
+ ||
selectedServer.equals(I18Nmsg.getMsg(InstallerI18NResourceKeys.NEW_SERVER_SELECT_ITEM));
+ }
+
public List<SelectItem> getRegisteredServerNames() {
List<SelectItem> result = new ArrayList<SelectItem>(0);
@@ -925,6 +931,7 @@ public class ConfigurationBean {
// should not call getServerConfiguration.setValue()
public void setSelectedRegisteredServerName(String selectedRegisteredServerName) {
this.selectedRegisteredServerName = selectedRegisteredServerName;
+ setHaServerName(selectedRegisteredServerName);
}
public String getHaServerName() {
diff --git a/modules/enterprise/gui/installer-war/src/main/webapp/start.jsp
b/modules/enterprise/gui/installer-war/src/main/webapp/start.jsp
index ad0219e..7bbb55c 100644
--- a/modules/enterprise/gui/installer-war/src/main/webapp/start.jsp
+++ b/modules/enterprise/gui/installer-war/src/main/webapp/start.jsp
@@ -210,7 +210,8 @@
document.getElementById('propForm:haendpointport').value = '';
document.getElementById('propForm:haendpointsecureport').value = '';
if
(document.getElementById('propForm:haaffinitygroup') != null) {
-
document.getElementById('propForm:haaffinitygroup').value = ''; }
+
document.getElementById('propForm:haaffinitygroup').value = '';
+ }
submit(); }" >
<f:selectItems
value="#{configurationBean.registeredServerNames}" />
</h:selectOneMenu>
@@ -233,7 +234,7 @@
<h:outputText value="#{bundle.propertyHighAvailabilityName}"
/>
</h:outputLink>
<h:inputText id="haservername"
size="#{configurationBean.propHaServerName.itemDefinition.fieldSize}"
- value="#{configurationBean.haServerName}" >
+ value="#{configurationBean.haServerName}"
readonly="#{not configurationBean.installationSettingsConfigurable}">
</h:inputText>
<h:outputText value="#{bundle.yesString}"
rendered="#{configurationBean.propHaServerName.itemDefinition.requiresRestart}"
/>
<h:outputText value="#{bundle.noString}"
rendered="#{!configurationBean.propHaServerName.itemDefinition.requiresRestart}"
/>
Show replies by date