Class TableEditorValidationHandlerTag

  • All Implemented Interfaces:
    ConditionalTag, PropertySupport, org.apache.commons.jelly.DynaTag, org.apache.commons.jelly.impl.BeanSource, org.apache.commons.jelly.Tag

    public class TableEditorValidationHandlerTag
    extends UseBeanBaseTag

    A tag handler class for defining the TableEditorValidationHandler to be used for a table component.

    With this tag - that can be placed in the body of a TableTag - a component can be registered at a table that is triggered for every validation of user input. This component has the opportunity of reacting on validation errors or post-processing user input.

    This tag is derived from UseBeanBaseTag, so the TableEditorValidationHandler to be installed can either be defined directly by providing the fully qualified class name or as a reference to a variable in the Jelly context. In addition to the attributes inherited from the base class the following ones are supported:

    Attribute Description Optional
    validationErrorTitle Here the title of an error message can be specified that is displayed in case of validation errors. This text can be evaluated by the TableEditorValidationHandler object. It is also possible to define only the error message without defining a concrete implementation object. Then the platform-specific default implementation will be used that accesses this error message. yes
    validationErrorTitleres This attribute has the same purpose than the validationErrorTitle attribute, but the title is set as a resource ID. yes
    validationErrorTitlegroup If the title of the validation error message box is specified as a resource ID, here the corresponding resource group can be defined. If this attribute is missing, the default resource group will be used. yes

    Version:
    $Id: TableEditorValidationHandlerTag.java 205 2012-01-29 18:29:57Z oheger $
    Author:
    Oliver Heger
    • Constructor Detail

      • TableEditorValidationHandlerTag

        public TableEditorValidationHandlerTag()
        Creates a new instance of TableEditorValidationHandlerTag.
    • Method Detail

      • passResults

        protected boolean passResults​(Object bean)
                               throws org.apache.commons.jelly.JellyTagException
        Passes the results of this tag. This implementation tries to find the enclosing table tag and sets the editor validation handler.
        Overrides:
        passResults in class UseBeanBaseTag
        Parameters:
        bean - the bean to be installed
        Returns:
        a flag whether the bean could be passed to a target
        Throws:
        org.apache.commons.jelly.JellyTagException - if an error occurs
      • isOptional

        protected boolean isOptional()
        Indicates if this bean definition is optional. This is the case for this tag because it is possible to define only properties for the TableEditorValidationHandler without actually creating an implementation.
        Overrides:
        isOptional in class UseBeanBaseTag
        Returns:
        the optional flag