org.apache.myfaces.trinidadinternal.renderkit.core.xhtml
Class TableRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.apache.myfaces.trinidad.render.CoreRenderer
          extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer
              extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer
All Implemented Interfaces:
java.lang.Cloneable, org.apache.myfaces.trinidad.render.TypedRenderer
Direct Known Subclasses:
DesktopTableRenderer, PdaTableRenderer

public abstract class TableRenderer
extends XhtmlRenderer


Field Summary
 
Fields inherited from class org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer
TRANSPARENT_GIF
 
Fields inherited from class org.apache.myfaces.trinidad.render.CoreRenderer
CHAR_UNDEFINED, NO_CHILD_INDEX
 
Constructor Summary
TableRenderer(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
           
 
Method Summary
static org.apache.myfaces.trinidad.event.RangeChangeEvent createRangeChangeEvent(org.apache.myfaces.trinidad.component.CollectionComponent table, int newStart)
           
protected  TableRenderingContext createRenderingContext(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component)
          Creates the correct subclass of the TableRenderingContext to use for this Renderer.
protected  java.util.Map<java.lang.String,java.lang.String> createResourceKeyMap()
           
 void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
protected  void decodeSelection(javax.faces.context.FacesContext context, javax.faces.component.UIComponent treeTable)
           
protected  void encodeAll(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  void findTypeConstants(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
           
protected  java.lang.String getEmptyText(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
static java.lang.String getHeaderFormatClass(TableRenderingContext tContext, boolean isColumnHeader)
           
 boolean getRendersChildren()
           
static java.lang.String getRowHeaderFormatClass()
           
protected  org.apache.myfaces.trinidad.render.CoreRenderer getSharedHideShowNode()
          Returns the shared UINode used to render detail hide/show
protected  org.apache.myfaces.trinidad.render.CoreRenderer getSharedNavBarRenderer()
          Returns the shared Renderer used to render navbars
protected  java.lang.Object getWidth(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected abstract  void renderControlBar(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext, javax.faces.component.UIComponent component)
          Renders the control bar
protected  void renderNavigationHeaderBars(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean)
          Render the navigation header bars, i.e. all the bars that appear above the actual data table. eg. title, controlbar and subcontrolbar
protected abstract  void renderSingleRow(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext, javax.faces.component.UIComponent component)
           
protected  int renderSpecialColumns(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext, javax.faces.component.UIComponent treeTable, int physicalColumnIndex)
          used to render special column headers, like select and details.
protected abstract  void renderSubControlBar(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext, javax.faces.component.UIComponent component, boolean isUpper)
          Render sthe area with the filter and links, if necessary
protected  void renderTableAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean, java.lang.Object cellPadding, java.lang.Object border)
          renders attributes on the outermost table element.
protected abstract  void renderTableContent(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext, javax.faces.component.UIComponent component)
          Renders the actual table content, with headers
protected  boolean renderTableWithoutColumns(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext, javax.faces.component.UIComponent component)
          Render an empty table, if necessary.
static void setSelectionResourceKeyMap(org.apache.myfaces.trinidad.context.RenderingContext arc, TableRenderingContext tContext)
          Sets the skinResourceKeyMap on the RenderingContext with a map which maps SkinSelectors.AF_COLUMN_CELL* styles to SkinSelectors.AF_TABLE_SELECT_MANY or SkinSelectors.AF_TABLE_SELECT_ONE styles.
protected  boolean shouldRenderId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Returns true if the component should render an ID.
 
Methods inherited from class org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer
cloneWithType, enableScriptDeferring, getAbsoluteImageUri, getBaseImageUri, getDefaultStyleClass, getInlineStyle, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getShortDesc, getStyleClass, renderAllAttributes, renderAllAttributes, renderDecorativeIcon, renderDecorativeIcon, renderEventHandlers, renderFormattedText, renderHAlign, renderInlineStyle, renderInlineStyleAttribute, renderPossiblyFormattedText, renderScriptDeferAttribute, renderScriptTypeAttribute, renderShortDescAttribute, renderSpacer, renderStyleAttributes, renderStyleAttributes, renderTransparent, renderVerticalSpacer, skipDecode, supportsAccessKeys, supportsAdvancedForms, supportsAutoCompleteFormElements, supportsDisabledFormElements, supportsEditing, supportsIntrinsicEvents, supportsNavigation, supportsReadonlyFormElements, supportsScripting, supportsSeparateWindow, supportsStyleAttributes, supportsTarget, supportsTextPresentation, supportsXMLDOM
 
Methods inherited from class org.apache.myfaces.trinidad.render.CoreRenderer
delegateRenderer, delegateRendererBegin, delegateRendererEnd, encodeAllChildren, encodeBegin, encodeBegin, encodeChild, encodeChildren, encodeEnd, encodeEnd, getClientId, getFacesBean, getFacet, getNextRenderedChildIndex, getRenderedChildCount, getRenderingProperty, hasRenderedChildren, isDesktop, isGecko, isIE, isInaccessibleMode, isPDA, isScreenReaderMode, renderEncodedActionURI, renderEncodedResourceURI, renderId, renderStyleClass, renderStyleClasses, setRenderingProperty, toChar, toInt, toLong, toString, toUri
 
Methods inherited from class javax.faces.render.Renderer
convertClientId, getConvertedValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableRenderer

public TableRenderer(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
Method Detail

findTypeConstants

protected void findTypeConstants(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
Overrides:
findTypeConstants in class XhtmlRenderer

getRendersChildren

public boolean getRendersChildren()
Overrides:
getRendersChildren in class javax.faces.render.Renderer

decode

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

decodeSelection

protected final void decodeSelection(javax.faces.context.FacesContext context,
                                     javax.faces.component.UIComponent treeTable)

createRangeChangeEvent

public static org.apache.myfaces.trinidad.event.RangeChangeEvent createRangeChangeEvent(org.apache.myfaces.trinidad.component.CollectionComponent table,
                                                                                        int newStart)

encodeAll

protected void encodeAll(javax.faces.context.FacesContext context,
                         org.apache.myfaces.trinidad.context.RenderingContext arc,
                         javax.faces.component.UIComponent component,
                         org.apache.myfaces.trinidad.bean.FacesBean bean)
                  throws java.io.IOException
Overrides:
encodeAll in class org.apache.myfaces.trinidad.render.CoreRenderer
Throws:
java.io.IOException

renderTableAttributes

protected void renderTableAttributes(javax.faces.context.FacesContext context,
                                     org.apache.myfaces.trinidad.context.RenderingContext arc,
                                     javax.faces.component.UIComponent component,
                                     org.apache.myfaces.trinidad.bean.FacesBean bean,
                                     java.lang.Object cellPadding,
                                     java.lang.Object border)
                              throws java.io.IOException
renders attributes on the outermost table element. this includes width, cellpadding, cellspacing, border.

Throws:
java.io.IOException

createRenderingContext

protected TableRenderingContext createRenderingContext(javax.faces.context.FacesContext context,
                                                       org.apache.myfaces.trinidad.context.RenderingContext arc,
                                                       javax.faces.component.UIComponent component)
Creates the correct subclass of the TableRenderingContext to use for this Renderer.


renderSingleRow

protected abstract void renderSingleRow(javax.faces.context.FacesContext context,
                                        org.apache.myfaces.trinidad.context.RenderingContext arc,
                                        TableRenderingContext tContext,
                                        javax.faces.component.UIComponent component)
                                 throws java.io.IOException
Throws:
java.io.IOException

renderTableWithoutColumns

protected boolean renderTableWithoutColumns(javax.faces.context.FacesContext context,
                                            org.apache.myfaces.trinidad.context.RenderingContext arc,
                                            TableRenderingContext tContext,
                                            javax.faces.component.UIComponent component)
                                     throws java.io.IOException
Render an empty table, if necessary.

Returns:
true if the table was empty, and an alternative empty version was shown, false otherwise.
Throws:
java.io.IOException

renderSpecialColumns

protected int renderSpecialColumns(javax.faces.context.FacesContext context,
                                   org.apache.myfaces.trinidad.context.RenderingContext arc,
                                   TableRenderingContext tContext,
                                   javax.faces.component.UIComponent treeTable,
                                   int physicalColumnIndex)
                            throws java.io.IOException
used to render special column headers, like select and details.

Returns:
the next physicalColumnIndex
Throws:
java.io.IOException

renderNavigationHeaderBars

protected void renderNavigationHeaderBars(javax.faces.context.FacesContext context,
                                          org.apache.myfaces.trinidad.context.RenderingContext arc,
                                          TableRenderingContext tContext,
                                          javax.faces.component.UIComponent component,
                                          org.apache.myfaces.trinidad.bean.FacesBean bean)
                                   throws java.io.IOException
Render the navigation header bars, i.e. all the bars that appear above the actual data table. eg. title, controlbar and subcontrolbar

Throws:
java.io.IOException

renderControlBar

protected abstract void renderControlBar(javax.faces.context.FacesContext context,
                                         org.apache.myfaces.trinidad.context.RenderingContext arc,
                                         TableRenderingContext tContext,
                                         javax.faces.component.UIComponent component)
                                  throws java.io.IOException
Renders the control bar

Throws:
java.io.IOException

renderSubControlBar

protected abstract void renderSubControlBar(javax.faces.context.FacesContext context,
                                            org.apache.myfaces.trinidad.context.RenderingContext arc,
                                            TableRenderingContext tContext,
                                            javax.faces.component.UIComponent component,
                                            boolean isUpper)
                                     throws java.io.IOException
Render sthe area with the filter and links, if necessary

Throws:
java.io.IOException

renderTableContent

protected abstract void renderTableContent(javax.faces.context.FacesContext context,
                                           org.apache.myfaces.trinidad.context.RenderingContext arc,
                                           TableRenderingContext tContext,
                                           javax.faces.component.UIComponent component)
                                    throws java.io.IOException
Renders the actual table content, with headers

Throws:
java.io.IOException

getEmptyText

protected java.lang.String getEmptyText(org.apache.myfaces.trinidad.bean.FacesBean bean)

getWidth

protected java.lang.Object getWidth(org.apache.myfaces.trinidad.bean.FacesBean bean)

getSharedHideShowNode

protected final org.apache.myfaces.trinidad.render.CoreRenderer getSharedHideShowNode()
Returns the shared UINode used to render detail hide/show


getSharedNavBarRenderer

protected org.apache.myfaces.trinidad.render.CoreRenderer getSharedNavBarRenderer()
Returns the shared Renderer used to render navbars


getRowHeaderFormatClass

public static java.lang.String getRowHeaderFormatClass()

getHeaderFormatClass

public static java.lang.String getHeaderFormatClass(TableRenderingContext tContext,
                                                    boolean isColumnHeader)
Parameters:
isColumnHeader - true if the style for a column header is needed.

setSelectionResourceKeyMap

public static void setSelectionResourceKeyMap(org.apache.myfaces.trinidad.context.RenderingContext arc,
                                              TableRenderingContext tContext)
Sets the skinResourceKeyMap on the RenderingContext with a map which maps SkinSelectors.AF_COLUMN_CELL* styles to SkinSelectors.AF_TABLE_SELECT_MANY or SkinSelectors.AF_TABLE_SELECT_ONE styles. We look at the selectionNode to figure out if it is tableSelectOne or tableSelectMany


shouldRenderId

protected boolean shouldRenderId(javax.faces.context.FacesContext context,
                                 javax.faces.component.UIComponent component)
Description copied from class: XhtmlRenderer
Returns true if the component should render an ID. Components that deliver events should always return "true".

Overrides:
shouldRenderId in class XhtmlRenderer

createResourceKeyMap

protected java.util.Map<java.lang.String,java.lang.String> createResourceKeyMap()


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