if (pe != null) {
Object bo = getBusinessObject(pe);
if (bo == null)
return;
BusinessRuleTask businessRuleTask = (BusinessRuleTask) bo;
ruleNamesText.setText("");
if(businessRuleTask.getRuleNames().size() > 0) {
StringBuilder ruleNameBuilder = new StringBuilder();
for (String ruleName: businessRuleTask.getRuleNames()) {
if(ruleNameBuilder.length() > 0) {
ruleNameBuilder.append(",");
}
ruleNameBuilder.append(ruleName);
}
ruleNamesText.setText(ruleNameBuilder.toString());
}
inputVariableNamesText.setText("");
if(businessRuleTask.getInputVariables().size() > 0) {
StringBuilder inputBuilder = new StringBuilder();
for (String input: businessRuleTask.getInputVariables()) {
if(inputBuilder.length() > 0) {
inputBuilder.append(",");
}
inputBuilder.append(input);
}
inputVariableNamesText.setText(inputBuilder.toString());
}
excludedButton.setSelection(businessRuleTask.isExclude());
nonExcludedButton.setSelection(!businessRuleTask.isExclude());
resultVariableNameText.setText("");
if(businessRuleTask.getResultVariableName() != null && businessRuleTask.getResultVariableName().length() > 0) {
resultVariableNameText.setText(businessRuleTask.getResultVariableName());
}
ruleNamesText.addFocusListener(listener);
excludedButton.addFocusListener(listener);
nonExcludedButton.addFocusListener(listener);