Class ValidationHelper


  • public class ValidationHelper
    extends Object
    A validation helper to help cell validation
    Author:
    dennis
    • Constructor Detail

      • ValidationHelper

        public ValidationHelper()
    • Method Detail

      • 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.