Class ActionValidateBuilder

java.lang.Object
com.axelor.meta.schema.actions.validate.ActionValidateBuilder

public class ActionValidateBuilder extends Object
The ActionValidateBuilder can be used to quickly define ActionValidate manually, especially when setting message to Response.setData(Object) or with Response.
  • Constructor Details

    • ActionValidateBuilder

      public ActionValidateBuilder(ValidatorType validatorType)
  • Method Details

    • setMessage

      public ActionValidateBuilder setMessage(String message)
      Set the message to show
      Parameters:
      message - the message to show
      Returns:
      this
    • setTitle

      public ActionValidateBuilder setTitle(String title)
      Set the title of the modal/notification
      Parameters:
      title - the title of the modal/notification
      Returns:
      this
    • setAction

      public ActionValidateBuilder setAction(String action)
      Set the action to be executed on error or alert message to make corrective measures, when error dialog is closed or alert dialog is canceled.
      Parameters:
      action - the action to be executed
      Returns:
      this
    • setConfirmBtnTitle

      public ActionValidateBuilder setConfirmBtnTitle(String confirmBtnTitle)
      Set the title of the confirm button
      Parameters:
      confirmBtnTitle - the title of the confirm button
      Returns:
      this
    • setCancelBtnTitle

      public ActionValidateBuilder setCancelBtnTitle(String cancelBtnTitle)
      Set the title of the cancel button
      Parameters:
      cancelBtnTitle - the title of the cancel button
      Returns:
      this
    • build

      public Map<String,Map<String,String>> build()
      Return a Map that represents the action validate.
      Returns:
      a Map