Skip navigation links
JSF Reference Implementation 2.3.5.SP3-redhat-00001
com.sun.faces.renderkit.html_basic

Class RadioRenderer

    • Constructor Detail

      • RadioRenderer

        public RadioRenderer()
    • Method Detail

      • processEvent

        public void processEvent(javax.faces.event.ComponentSystemEvent event)
                          throws javax.faces.event.AbortProcessingException
        After adding component to view, if component has group attribute set, then pre-collect the components by group.
        Specified by:
        processEvent in interface javax.faces.event.ComponentSystemEventListener
        Parameters:
        event - the ComponentSystemEvent instance that is being processed.
        Throws:
        javax.faces.event.AbortProcessingException - if lifecycle processing should cease for this request.
      • decode

        public void decode(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
        This override delegates to #decodeGroup(FacesContext, UISelectOne, String) when 'group' attribute is set. It will only decode when the current component is the first one of group.
        Overrides:
        decode in class MenuRenderer
        Parameters:
        context - FacesContext for the request we are processing
        component - UIComponent to be decoded.
      • encodeEnd

        public void encodeEnd(javax.faces.context.FacesContext context,
                              javax.faces.component.UIComponent component)
                       throws IOException
        This override delegates to #encodeEndGroup(FacesContext, UISelectOne, String) when 'group' attribute is set.
        Overrides:
        encodeEnd in class SelectManyCheckboxListRenderer
        Parameters:
        context - FacesContext for the response we are creating
        component - UIComponent to be rendered
        Throws:
        IOException - if an input/output error occurs while rendering
      • decodeGroup

        protected void decodeGroup(javax.faces.context.FacesContext context,
                                   javax.faces.component.UISelectOne radio,
                                   RadioRenderer.Group group)
        The difference with default decoding is:
      • Submitted value is obtained by group name.
      • Submitted value is prefixed with client ID of radio button component, this need to be compared and trimmed.
      • If any submitted value does not belong to current radio button component, reset its value.
  • encodeEndGroup

    protected void encodeEndGroup(javax.faces.context.FacesContext context,
                                  javax.faces.component.UISelectOne radio,
                                  RadioRenderer.Group group)
                           throws IOException
    The difference with default encoding is:
  • Every radio button of same 'group' will have same 'name' attribute rendered, relative to UIForm parent.
  • The 'value' attribute of every radio button is prefixed with client ID of radio button component itself.
  • No additional (table) markup is being rendered.
  • Label, if any, is rendered directly after radio button element, without additional markup.
Throws:
IOException
JSF Reference Implementation 2.3.5.SP3-redhat-00001

Copyright © 2010–2019 JBoss by Red Hat. All rights reserved.