Package io.keikaiex.ui
Class ValidationHelper
java.lang.Object
io.keikaiex.ui.ValidationHelper
A validation helper to help cell validation
- Author:
- dennis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvalidate(Sheet sheet, int row, int col, String editText, org.zkoss.zk.ui.event.EventListener callback) To help you validate the cell edit text, it returns true if validation passed or no validation rule. You can also assign a callback listener if the cell is configured to show a error-box to ask user re-input the edit value again when validation fail.
-
Constructor Details
-
ValidationHelper
public ValidationHelper()
-
-
Method Details
-
validate
public boolean validate(Sheet sheet, int row, int col, String editText, org.zkoss.zk.ui.event.EventListener callback) To help you validate the cell edit text, it returns true if validation passed or no validation rule. You can also assign a callback listener if the cell is configured to show a error-box to ask user re-input the edit value again when validation fail. In this case, it will shows a dialog to ask user's input, and call the callback listener to let you process the new edit text again.- Parameters:
sheet-row-col-editText-callback- the callback listener for validation- Returns:
- true if validation passed, otherwise false.
-