public ScTableRow addDataRow() { ScTableRow e = new ScTableRow(); if (_rows.size() % 2 == 0) e.setHtmlClassForCells(DATA_TABLE_ODD_CLASS); else e.setHtmlClassForCells(DATA_TABLE_EVEN_CLASS); e.setAppendSpaceOnCells(true); return add(e); }
public boolean validate(ScServletData data) { if (hasDegreesError(data) || hasMinutesError(data) || hasSecondsError(data) || hasDirectionError(data)) { String msg = "Cannot parse value."; String sample = getSampleFormat(); if (sample != null) msg += " Sample: " + sample; getState(data).addError(msg); return false; } if (_validator == null) return true; JwList<JwErrorIF> errors = new JwList<JwErrorIF>(); _validator.validate(getValue(data), errors); if (errors.isEmpty()) return true; getState(data).setErrors(errors); return false; }
public ScTableRow add(int index, ScTableRow e) { checkReadOnly(); e.setParent(this); _rows.add(index, e); return e; }