SelectItem metricDropDownMenu = buildMetricDropDownMenu(RANGE_METRIC_ITEMNAME, false, ifFunc, editMode);
if (metricDropDownMenu != null) {
formItems.add(metricDropDownMenu);
formItems.add(buildRangeComparatorDropDownMenu(RANGE_COMPARATOR_ITEMNAME, ifFunc, editMode));
TextItem absoluteLowValue = new TextItem(RANGE_LO_ABSVALUE_ITEMNAME,
MSG.view_alert_definition_condition_editor_metric_range_lovalue());
absoluteLowValue.setWrapTitle(false);
absoluteLowValue.setRequired(true);
absoluteLowValue.setTooltip(MSG.view_alert_definition_condition_editor_metric_range_lovalue_tooltip());
absoluteLowValue.setHoverWidth(200);
absoluteLowValue.setValidateOnChange(true);
absoluteLowValue.setValidators(new NumberWithUnitsValidator(this.resourceType.getMetricDefinitions(),
metricDropDownMenu));
absoluteLowValue.setShowIfCondition(ifFunc);
TextItem absoluteHighValue = new TextItem(RANGE_HI_ABSVALUE_ITEMNAME,
MSG.view_alert_definition_condition_editor_metric_range_hivalue());
absoluteHighValue.setWrapTitle(false);
absoluteHighValue.setRequired(true);
absoluteHighValue.setTooltip(MSG.view_alert_definition_condition_editor_metric_range_hivalue_tooltip());
absoluteHighValue.setHoverWidth(200);
absoluteHighValue.setValidateOnChange(true);
absoluteHighValue.setValidators(new NumberWithUnitsValidator(this.resourceType.getMetricDefinitions(),
metricDropDownMenu));
absoluteHighValue.setShowIfCondition(ifFunc);
if (editMode) {
absoluteLowValue.setDefaultValue(String.valueOf(existingCondition.getThreshold()));
absoluteHighValue.setDefaultValue(String.valueOf(existingCondition.getOption()));
}
formItems.add(absoluteLowValue);
formItems.add(absoluteHighValue);
formItems.add(buildBaseUnitsItem(metricDropDownMenu, ifFunc, editMode));