Class ValidationHelper

java.lang.Object
io.keikaiex.ui.ValidationHelper

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.