modules/core/gui/src/main/java/org/rhq/core/gui/configuration/helper/PropertyRenderingUtility.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit 7e86d4a1c98005e40f864ac5684952e6c1e01d00 Author: Lukas Krejci lkrejci@redhat.com Date: Mon Dec 6 15:06:04 2010 +0100
BZ 610859 - Deleting an entry from a property list doesn't confuse the unset properties anymore.
diff --git a/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/helper/PropertyRenderingUtility.java b/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/helper/PropertyRenderingUtility.java index c20452c..6df216f 100644 --- a/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/helper/PropertyRenderingUtility.java +++ b/modules/core/gui/src/main/java/org/rhq/core/gui/configuration/helper/PropertyRenderingUtility.java @@ -271,7 +271,13 @@ public class PropertyRenderingUtility { //}
if (postBack) { - boolean inputIsNull = PropertySimpleValueConverter.NULL_INPUT_VALUE.equals(input.getSubmittedValue()); + //we need to do a check for both null and NULL_INPUT_VALUE here. + //The null value is present in the stored state in the session + //(that is what the NULL_INPUT_VALUE becomes after processing with PropertySimpleValueConverter) + //where as NULL_INPUT_VALUE is actually submitted from the client. + //Because this is a common method that processes the page regardless + //of where the input has come from, we need to check for both possible values. + boolean inputIsNull = input.getSubmittedValue() == null || PropertySimpleValueConverter.NULL_INPUT_VALUE.equals(input.getSubmittedValue()); FacesComponentUtility.setUnset(input, inputIsNull); } if (FacesComponentUtility.isUnset(input)) {
rhq-commits@lists.fedorahosted.org