A new property cannot be added in "Cluster System Properties" page.
Steps to reproduce:
1. Open Admin Console
2. Create a new cluster, e.g. cluster1
3. Click on "cluster1" (to go to "General Information" page) then click on the "Properties" tab (to get to the "Cluster System Properties" page).
4. Click on "Add Property" and enter "myprop" for the Instance Variable Name and "123" for the Override Value, then hit the "Save" button.
=> Page displays message "New values successfully saved." however the table now DOES NOT contain the newly added property.
If the domain.xml is checked, the newly added property has NOT been added to the file.
Below shows where it SHOULD HAVE been added to the file:
<cluster ... name="cluster1" ... >
<system-property name="myprop" value="123"></system-property>
We further observe that adding a property with the same name as an existing one or adding a property with no name specified, does not result in any error when the "Save" button is hit (in addition to the fact that the newly added properties are discarded).
System properties may be specified for "server" and for cluster instances, using a very similar page.
To see this page for server, click on "server" in the navigation tree, to go to its "General Information" page, then click on the "Properties" tab ("System Properties" page).
To see this page for cluster instances, create a cluster instance, click on the link for it, to go to its "General Information" page, then click on the "Properties" tab ("Instance System Properties" page).
These pages properly support adding new properties, and properly validate the properties (checks for duplicate properties and those with no name specified etc.)
The JSF files which specify the "Save" button actions for Cluster System Properties and Server/Instance System Properties are (respectively):
If we compare these files, it is apparent that the "clusterSystemPropertiesButtons.jsf" has the following problems:
- the wrong table column name is being used for the property value (using "row.value" instead of "row.overrideValue")
- the wrong parameter name for the property map is being used in the gf.restRequest() invocation ("data" instead of "attrs")
The following change fixes this bug. "main\appserver\admingui\cluster\src\main\resources\cluster\clusterSystemPropertiesButtons.jsf"