Class InputMaskRenderer

    • Constructor Detail

      • InputMaskRenderer

        public InputMaskRenderer()
    • Method Detail

      • decode

        public void decode​(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
        Overrides:
        decode in class javax.faces.render.Renderer
      • translateMaskIntoRegex

        protected Pattern translateMaskIntoRegex​(javax.faces.context.FacesContext context,
                                                 String mask)
        Translates the client side mask to to a Pattern base on: https://github.com/digitalBush/jquery.maskedinput a - Represents an alpha character (A-Z,a-z) 9 - Represents a numeric character (0-9) * - Represents an alphanumeric character (A-Z,a-z,0-9) ? - Makes the following input optional
        Parameters:
        context - The FacesContext
        mask - The mask value of component
        Returns:
        The generated Pattern
      • translateMaskCharIntoRegex

        protected String translateMaskCharIntoRegex​(char c,
                                                    boolean optional)
      • encodeEnd

        public void encodeEnd​(javax.faces.context.FacesContext context,
                              javax.faces.component.UIComponent component)
                       throws IOException
        Overrides:
        encodeEnd in class javax.faces.render.Renderer
        Throws:
        IOException