- Using displayName where appropriate.
- Ensuring descriptor exists before attempting to use a default value.
This commit is contained in:
Matt Gilman 2014-12-09 15:58:32 -05:00
parent 63e80d3fdc
commit 3861446958
2 changed files with 15 additions and 11 deletions

View File

@ -475,12 +475,12 @@ nf.ProcessorPropertyTable = (function () {
// use the display name if possible
displayName = descriptor.displayName;
}
// determine the value
if (nf.Common.isUndefined(value) || nf.Common.isNull(value)) {
value = descriptor.defaultValue;
}
}
// add the row
propertyData.addItem({

View File

@ -462,6 +462,7 @@ nf.ProcessorDetails = (function () {
// determine the property type
var type = 'userDefined';
var displayName = name;
if (nf.Common.isDefinedAndNotNull(descriptor)) {
if (descriptor.required === true) {
type = 'required';
@ -470,17 +471,20 @@ nf.ProcessorDetails = (function () {
} else {
type = 'optional';
}
}
// use the display name if possible
displayName = descriptor.displayName;
// determine the value
if (nf.Common.isUndefined(value) || nf.Common.isNull(value)) {
value = descriptor.defaultValue;
}
}
// add the row
propertyData.addItem({
id: i++,
property: name,
property: displayName,
value: value,
type: type
});