private int getIterations() {
int iterations = ibIterations.getValue() != null ? ibIterations
.getValue().intValue() : 0;
if (iterations == 0) {
throw new WrongValueException(ibIterations,
_("cannot be empty"));
}
if (iterations < 0 || iterations > MAX_NUMBER_ITERATIONS) {
throw new WrongValueException(ibIterations,
_("Number of iterations should be between 1 and {0}",
MAX_NUMBER_ITERATIONS));
}
return iterations;
}
private void validateRowsPercentages() {
Intbox intbox;
int page = 0;
int counter = 0;
Rows rows = gridCriticalPathTasks.getRows();
for (Object each : rows.getChildren()) {
Row row = (Row) each;
List<org.zkoss.zk.ui.Component> children = row
.getChildren();
Integer sum = 0;
intbox = (Intbox) children.get(3);
sum += intbox.getValue();
intbox = (Intbox) children.get(5);
sum += intbox.getValue();
intbox = (Intbox) children.get(7);
sum += intbox.getValue();
if (sum != 100) {
gridCriticalPathTasks.setActivePage(page);
throw new WrongValueException(row,
_("Percentages should sum 100"));
}
counter++;
if (counter % gridCriticalPathTasks.getPageSize() == 0) {