// default is ONE_BY_ONE
if (securityCheck.getExecutionStrategy().getImmutable()) {
strategy.setDisabled();
}
strategy.addFormFieldListener(new XFormFieldListener() {
@Override
public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
if (newValue.equals(strategyOptions[0])) {
securityCheck.getExecutionStrategy().setStrategy(StrategyTypeConfig.ONE_BY_ONE);
} else {
securityCheck.getExecutionStrategy().setStrategy(StrategyTypeConfig.ALL_AT_ONCE);
}
}
});
XFormField delay = strategyDialog.getFormField(Strategy.DELAY);
delay.setValue(String.valueOf(securityCheck.getExecutionStrategy().getDelay()));
delay.addFormFieldListener(new XFormFieldListener() {
@Override
public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
try {
if ("".equals(newValue)) {
return;
}
Integer.valueOf(newValue);
securityCheck.getExecutionStrategy().setDelay(Integer.valueOf(newValue));
} catch (Exception e) {
UISupport.showErrorMessage("Delay value must be integer number");
}
}
});
XFormField applyToFailedTests = strategyDialog.getFormField(Strategy.APPLY_TO_FAILED_STEPS);
applyToFailedTests.setValue(String.valueOf(securityCheck.isApplyForFailedStep()));
applyToFailedTests.addFormFieldListener(new XFormFieldListener() {
@Override
public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
securityCheck.setApplyForFailedTestStep(Boolean.parseBoolean(newValue));
}
});
XFormField runOnlyOnce = strategyDialog.getFormField(Strategy.RUN_ONLY_ONCE);
runOnlyOnce.setValue(String.valueOf(securityCheck.isRunOnlyOnce()));
runOnlyOnce.addFormFieldListener(new XFormFieldListener() {
@Override
public void valueChanged(XFormField sourceField, String newValue, String oldValue) {
securityCheck.setRunOnlyOnce(Boolean.parseBoolean(newValue));
}