|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RowValidator
Validator
is an interface for validating a row in table.
Method Summary | |
---|---|
ValidationResult |
validating(RowValidationObject vo)
Validates the value in the RowValidationObject. |
Method Detail |
---|
ValidationResult validating(RowValidationObject vo)
ValidationResult
allows user to specify the fail behavior such as FAIL_BEHAVIOR_REVERT,
FAIL_BEHAVIOR_RESET or FAIL_BEHAVIOR_PERSIST, in the case of RowValidator, none of the options make sense so the
fail behavior you set will be ignored. So it is better you process the error right there in the validating
method. See the code below for an example.
public ValidationResult validating(RowValidationObject vo) {
boolean valid = ...; // validate the row
if (valid) {
return null;
}
else {
PortingUtils.notifyUser(); // notify the user
table.editCellAt(vo.getRowIndex(), 5); // force editing mode in case this is the invalid cell.
return new RowValidationResult(false, new int[]{5});
}
}
Please note all the RowValidators added to a JideTable will be used for to validate any rows.
vo
- the ValidationObject
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |