Class InputRenderer

    • Constructor Detail

      • InputRenderer

        public InputRenderer()
    • Method Detail

      • getConvertedValue

        public Object getConvertedValue​(javax.faces.context.FacesContext context,
                                        javax.faces.component.UIComponent component,
                                        Object submittedValue)
                                 throws javax.faces.convert.ConverterException
        Overrides:
        getConvertedValue in class javax.faces.render.Renderer
        Throws:
        javax.faces.convert.ConverterException
      • isDisabled

        protected boolean isDisabled​(javax.faces.component.UIInput component)
      • isReadOnly

        protected boolean isReadOnly​(javax.faces.component.UIInput component)
      • shouldDecode

        protected boolean shouldDecode​(javax.faces.component.UIInput component)
      • renderRTLDirection

        public <T extends javax.faces.component.UIComponent & RTLAware> void renderRTLDirection​(javax.faces.context.FacesContext context,
                                                                                                T component)
                                                                                         throws IOException
        Throws:
        IOException
      • renderARIARequired

        protected void renderARIARequired​(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIInput component)
                                   throws IOException
        Adds "aria-required" if the component is required.
        Parameters:
        context - the FacesContext
        component - the UIInput component to add attributes for
        Throws:
        IOException - if any error occurs writing the response
      • renderARIAInvalid

        protected void renderARIAInvalid​(javax.faces.context.FacesContext context,
                                         javax.faces.component.UIInput component)
                                  throws IOException
        Adds "aria-invalid" if the component is invalid.
        Parameters:
        context - the FacesContext
        component - the UIInput component to add attributes for
        Throws:
        IOException - if any error occurs writing the response
      • renderAccessibilityAttributes

        protected void renderAccessibilityAttributes​(javax.faces.context.FacesContext context,
                                                     javax.faces.component.UIInput component)
                                              throws IOException
        Adds the following accessibility attributes to an HTML DOM element.
         "aria-required" if the component is required
         "aria-invalid" if the component is invalid
         "aria-labelledby" if the component has a labelledby attribute
         "disabled" and "aria-disabled" if the component is disabled
         "readonly" and "aria-readonly" if the component is readonly
         
        Parameters:
        context - the FacesContext
        component - the UIInput component to add attributes for
        Throws:
        IOException - if any error occurs writing the response
      • renderAccessibilityAttributes

        protected void renderAccessibilityAttributes​(javax.faces.context.FacesContext context,
                                                     javax.faces.component.UIInput component,
                                                     boolean disabled,
                                                     boolean readonly)
                                              throws IOException
        Throws:
        IOException
      • renderARIACombobox

        protected void renderARIACombobox​(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIInput component)
                                   throws IOException
        Adds ARIA attributes if the component is "role=combobox".
        Parameters:
        context - the FacesContext
        component - the UIInput component to add attributes for
        Throws:
        IOException - if any error occurs writing the response
      • createStyleClass

        protected String createStyleClass​(javax.faces.component.UIInput component,
                                          String defaultStyleClass)
        Creates a styleClass for the component which consists of: 1) default style class 2) Error State 3) Disabled State 4) user style class
        Parameters:
        component - the UIInput component to construct styleClass for
        defaultStyleClass - the default style for the component if any
        Returns:
        the properly constructed style class string
      • createStyleClass

        protected String createStyleClass​(javax.faces.component.UIInput component,
                                          String styleClassProperty,
                                          String defaultStyleClass)
        Creates a styleClass for the component which consists of: 1) default style class 2) Error State 3) Disabled State 4) user style class
        Parameters:
        component - the UIInput component to construct styleClass for
        styleClassProperty - eg "styleClass" or "inputStyleClass"
        defaultStyleClass - the default style for the component if any
        Returns:
        the properly constructed style class string