Class VFilledOnFilled


public abstract class VFilledOnFilled extends VConditional
Validates that some condition/state for a group of fields implies some other condition/state for another group of fields. The pre/post conditions are both the result of validators attached to the pre/post fields.
  • Constructor Details

    • VFilledOnFilled

      public VFilledOnFilled(Form f, String name, String errorMessage, VFilledGroup preValidator, VFilledGroup postValidator)
      Parameters:
      name - name for this validator
      errorMessage - validation error message
      preValidator - a pre condition validator
      postValidator - a post condition validator
  • Method Details

    • preConditionMet

      public boolean preConditionMet(FormData fd, jakarta.servlet.http.HttpServletRequest req)
      Description copied from class: VConditional
      Subclasses should implement this method to check that certain fields or pre-conditions have been met. Only gf these conditions have been met will there be a check to see that the post conditions are also true.
      Specified by:
      preConditionMet in class VConditional
      Returns:
      true if the pre-conditions have been met, false otherwise
    • postConditionMet

      public boolean postConditionMet(FormData fd, jakarta.servlet.http.HttpServletRequest req)
      Description copied from class: VConditional
      Subclasses should implement this method to check that certain post conditions have been met. This method will only be called if the VConditional.preConditionMet(FormData, HttpServletRequest) method returns true.
      Specified by:
      postConditionMet in class VConditional
      Returns:
      true if the post-conditions have been met, false otherwise