org.apache.myfaces.trinidadinternal.renderkit.html.layout
Class CorePanelRadioRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase
          extended by org.apache.myfaces.trinidadinternal.renderkit.html.layout.CorePanelRadioRenderer

public class CorePanelRadioRenderer
extends UINodeRendererBase

Renderer for PanelRadio

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/renderkit/html/layout/CoreShowOneRadioRenderer.java#0 $) $Date: 10-nov-2005.19:01:13 $
Author:
The Oracle ADF Faces Team

Constructor Summary
CorePanelRadioRenderer()
           
 
Method Summary
protected  boolean elementSupportsPartial(UIXRenderingContext context, java.lang.String id)
          Returns true if the showOneChoice element has an id and the browser supports PPR
 void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          If nothing is disclosed, makes the first child disclosed.
 void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Renders a table and renders a choice list / radio button within it.
 void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Dummy method to prevent base class' encodeEnd call.
protected  java.lang.String getFieldTextClass()
          Gets classname of the text associated with HTML control text
protected  java.lang.String getHTMLControlID(java.lang.String compId)
          Gets id of the rendered HTML control
protected  java.lang.String getLabelControlSeparatorSize()
          Gets classname of the text associated with HTML control text
 boolean getRendersChildren()
          
protected  void renderListDisplay(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String disclosedChildId)
          Renders the list UI Control either radio buttons or choice.
protected  void renderSelectLabel(UIXRenderingContext rCtx, javax.faces.component.UIComponent component, javax.faces.context.ResponseWriter out, URLEncoder encoder, java.lang.String compId)
          Renders the label associated with the control.
protected  void renderSpacerTD(javax.faces.context.ResponseWriter out, javax.faces.component.UIComponent component, java.lang.String separatorSize)
          Generates markup for rendering a blank TD.
protected  void writeAdditionalJS(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Writes any additional javascriipt required to support the control.
protected  void writeLabel(javax.faces.context.ResponseWriter out, javax.faces.component.UIComponent component, URLEncoder encoder, java.lang.String label)
          Renders the label text with character underlined for label.
 
Methods inherited from class org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase
getRenderingContext, getRenderingContext, skipDecode
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, decode, getConvertedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CorePanelRadioRenderer

public CorePanelRadioRenderer()
Method Detail

renderListDisplay

protected void renderListDisplay(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component,
                                 java.lang.String disclosedChildId)
                          throws java.io.IOException
Renders the list UI Control either radio buttons or choice.

Throws:
java.io.IOException

getRendersChildren

public boolean getRendersChildren()

Overrides:
getRendersChildren in class UINodeRendererBase
Returns:
true always

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context,
                        javax.faces.component.UIComponent component)
                 throws java.io.IOException
If nothing is disclosed, makes the first child disclosed. Makes sure that the child it's disclosing has rendered = true and is not disabled.

Overrides:
encodeBegin in class UINodeRendererBase
Parameters:
context -
component -
Throws:
java.io.IOException

encodeChildren

public void encodeChildren(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent component)
                    throws java.io.IOException
Renders a table and renders a choice list / radio button within it. Depending on position and alignment attributes, renders the list control and disclosed showDetail child in the correct row and column. Non UIXShowDetail children are ignored. The label of each of radio / choice items is the same as the text assigned to CoreShowDetailItem child. If no text attrbute value specified, the label remains blank.

Overrides:
encodeChildren in class UINodeRendererBase
Throws:
java.io.IOException

encodeEnd

public void encodeEnd(javax.faces.context.FacesContext context,
                      javax.faces.component.UIComponent component)
               throws java.io.IOException
Dummy method to prevent base class' encodeEnd call.

Overrides:
encodeEnd in class UINodeRendererBase
Parameters:
context - the faces context object
component - the UIComponent object
Throws:
java.io.IOException - when some issues while writing output

writeAdditionalJS

protected void writeAdditionalJS(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component)
                          throws java.io.IOException
Writes any additional javascriipt required to support the control. Default implementation doesn't do anything.

Parameters:
context - the facesContext object
component -
Throws:
java.io.IOException - when any IO error while writing markup

elementSupportsPartial

protected boolean elementSupportsPartial(UIXRenderingContext context,
                                         java.lang.String id)
Returns true if the showOneChoice element has an id and the browser supports PPR


renderSelectLabel

protected void renderSelectLabel(UIXRenderingContext rCtx,
                                 javax.faces.component.UIComponent component,
                                 javax.faces.context.ResponseWriter out,
                                 URLEncoder encoder,
                                 java.lang.String compId)
                          throws java.io.IOException
Renders the label associated with the control. Takes care of encoding for label text and the accessKey.

Throws:
java.io.IOException

writeLabel

protected void writeLabel(javax.faces.context.ResponseWriter out,
                          javax.faces.component.UIComponent component,
                          URLEncoder encoder,
                          java.lang.String label)
                   throws java.io.IOException
Renders the label text with character underlined for label. Takes care of encoding for label text and the accessKey.

Throws:
java.io.IOException

renderSpacerTD

protected void renderSpacerTD(javax.faces.context.ResponseWriter out,
                              javax.faces.component.UIComponent component,
                              java.lang.String separatorSize)
                       throws java.io.IOException
Generates markup for rendering a blank TD.

Throws:
java.io.IOException

getHTMLControlID

protected java.lang.String getHTMLControlID(java.lang.String compId)
Gets id of the rendered HTML control


getFieldTextClass

protected java.lang.String getFieldTextClass()
Gets classname of the text associated with HTML control text


getLabelControlSeparatorSize

protected java.lang.String getLabelControlSeparatorSize()
Gets classname of the text associated with HTML control text



Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.