diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js index ceaa5294cd..a7c488c3fc 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-combo-editor.js @@ -51,13 +51,15 @@ nf.ProcessorPropertyComboEditor = function (args) { optionClass: 'unset' }); } - $.each(allowableValues, function (i, allowableValue) { - options.push({ - text: allowableValue.displayName, - value: allowableValue.value, - description: nf.Common.escapeHtml(allowableValue.description) + if ($.isArray(allowableValues)) { + $.each(allowableValues, function (i, allowableValue) { + options.push({ + text: allowableValue.displayName, + value: allowableValue.value, + description: nf.Common.escapeHtml(allowableValue.description) + }); }); - }); + } // ensure the options there is at least one option if (options.length === 0) { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js index f19a00115f..0dc945a9e3 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-nfel-editor.js @@ -160,18 +160,13 @@ nf.ProcessorPropertyNfelEditor = function (args) { // otherwise if the property is required if (nf.ProcessorPropertyTable.isRequiredProperty(propertyDescriptor)) { if (nf.Common.isBlank(propertyDescriptor.defaultValue)) { - // reset to the previous value if available - if (nf.Common.isDefinedAndNotNull(previousValue)) { - return previousValue; - } else { - return undefined; - } + return previousValue; } else { return propertyDescriptor.defaultValue; } } else { // if the property is not required, clear the value - return undefined; + return null; } } } else { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js index d5ff1c4093..486ded6aaa 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js @@ -40,7 +40,7 @@ nf.ProcessorPropertyTable = (function () { hidden: false, property: propertyName, displayName: propertyName, - previousValue: undefined, + previousValue: null, value: propertyValue, type: 'userDefined' }); @@ -377,7 +377,7 @@ nf.ProcessorPropertyTable = (function () { if (nf.Common.isDefinedAndNotNull(propertyDescriptor)) { return propertyDescriptor.allowableValues; } else { - return undefined; + return null; } }, /** @@ -477,7 +477,7 @@ nf.ProcessorPropertyTable = (function () { displayName = descriptor.displayName; // determine the value - if (nf.Common.isUndefined(value) || nf.Common.isNull(value)) { + if (nf.Common.isNull(value) && nf.Common.isDefinedAndNotNull(descriptor.defaultValue)) { value = descriptor.defaultValue; } } diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-text-editor.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-text-editor.js index 04bd6524b0..7eb562afe8 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-text-editor.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-text-editor.js @@ -169,18 +169,13 @@ nf.ProcessorPropertyTextEditor = function (args) { // otherwise if the property is required if (nf.ProcessorPropertyTable.isRequiredProperty(propertyDescriptor)) { if (nf.Common.isBlank(propertyDescriptor.defaultValue)) { - // reset to the previous value if available - if (nf.Common.isDefinedAndNotNull(previousValue)) { - return previousValue; - } else { - return undefined; - } + return previousValue; } else { return propertyDescriptor.defaultValue; } } else { // if the property is not required, clear the value - return undefined; + return null; } } } else { diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js index 8daff9a07f..b4c1da9bfa 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js @@ -476,7 +476,7 @@ nf.ProcessorDetails = (function () { displayName = descriptor.displayName; // determine the value - if (nf.Common.isUndefined(value) || nf.Common.isNull(value)) { + if (nf.Common.isNull(value) && nf.Common.isDefinedAndNotNull(descriptor.defaultValue)) { value = descriptor.defaultValue; } }