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

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
All Implemented Interfaces:
java.lang.Cloneable, org.apache.myfaces.trinidad.render.TypedRenderer
Direct Known Subclasses:
BreadCrumbsRenderer, ChartRenderer, ChooseDateRenderer, ColumnGroupRenderer, DesktopPanelPageHeaderRenderer, DocumentRenderer, FormRenderer, FrameBorderLayoutRenderer, FrameRenderer, FrameRenderer, GoLinkRenderer, HeadRenderer, HtmlRenderer, IconRenderer, ImageRenderer, LabelAndMessageRenderer, MediaRenderer, NavigationPaneRenderer, PanelBorderLayoutRenderer, PanelBoxRenderer, PanelFormLayoutRenderer, PanelGroupLayoutRenderer, PanelHeaderRenderer, PanelHorizontalLayoutRenderer, PanelListRenderer, PanelPartialRootRenderer, PanelTipRenderer, PdaFrameBorderLayoutRenderer, PdaPanelPageHeaderRenderer, PollRenderer, SelectRangeChoiceBarRenderer, SeparatorRenderer, ShowDetailItemRenderer, SpacerRenderer, StyleSheetRenderer, TableRenderer, TableSelectOneRenderer, TrainRenderer, TrainRenderer, TreeRenderer, TreeTableNavRenderer, ValueRenderer

public class XhtmlRenderer
extends org.apache.myfaces.trinidad.render.CoreRenderer
implements org.apache.myfaces.trinidad.render.TypedRenderer, java.lang.Cloneable


Field Summary
static java.lang.String TRANSPARENT_GIF
           
 
Fields inherited from class org.apache.myfaces.trinidad.render.CoreRenderer
CHAR_UNDEFINED, NO_CHILD_INDEX
 
Constructor Summary
protected XhtmlRenderer(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
           
 
Method Summary
 javax.faces.render.Renderer cloneWithType(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
          Clone a Renderer instance with a new Type.
static void enableScriptDeferring(org.apache.myfaces.trinidad.context.RenderingContext arc, boolean isEnabled)
           
protected  void findTypeConstants(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
           
static java.lang.String getAbsoluteImageUri(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.String imagePath)
           
protected static java.lang.String getBaseImageUri(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc)
           
protected  java.lang.String getDefaultStyleClass(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getInlineStyle(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnclick(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOndblclick(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnkeydown(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnkeypress(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnkeyup(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnmousedown(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnmousemove(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnmouseout(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnmouseover(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getOnmouseup(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getShortDesc(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getStyleClass(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  void renderAllAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.bean.FacesBean bean)
          Render the main renderer-specific attributes: "title", "class", "style", and all the Javascript attributes.
protected  void renderAllAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.bean.FacesBean bean, boolean renderStyleAttrs)
          Render the main renderer-specific attributes: "title", "class", "style", and all the Javascript attributes.
protected  void renderDecorativeIcon(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.String iconUri, java.lang.Object width, java.lang.Object height, java.lang.Object id, java.lang.Object altText)
          Renders an icon.
protected  void renderDecorativeIcon(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.String iconUri, java.lang.Object width, java.lang.Object height, java.lang.Object id, java.lang.Object altText, javax.faces.component.UIComponent comp)
           
protected  void renderEventHandlers(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.bean.FacesBean bean)
          Render all the Javascript attributes.
protected  void renderFormattedText(javax.faces.context.FacesContext context, java.lang.Object textValue)
           
protected static void renderHAlign(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.Object hAlign)
           
protected  void renderInlineStyle(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.bean.FacesBean bean)
           
static void renderInlineStyleAttribute(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.String style)
          Renders the inline style attribute for the specified node
protected  void renderPossiblyFormattedText(javax.faces.context.FacesContext context, java.lang.Object textValue)
           
static void renderScriptDeferAttribute(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc)
          Renders the "defer" attribute for a script element.
static void renderScriptTypeAttribute(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc)
          Checks whether in screen reader mode, and if so, renders "type" attribute for a script element.
protected  void renderShortDescAttribute(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  void renderSpacer(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.String width, java.lang.String height)
          Renders a spacer.
protected  void renderStyleAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  void renderStyleAttributes(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, org.apache.myfaces.trinidad.bean.FacesBean bean, java.lang.String defaultStyleClass)
          When there's a default style class pass it in to this method
protected  void renderTransparent(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, java.lang.String width, java.lang.String height, boolean needsQuoting, java.lang.Object id)
          Renders a transparent gif using a script to save space.
protected  void renderVerticalSpacer(javax.faces.context.FacesContext context, java.lang.Object height, java.lang.Object id, javax.faces.component.UIComponent comp)
          Renders a vertical spacer for a specified non-null height.
protected  boolean shouldRenderId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Returns true if the component should render an ID.
protected  boolean skipDecode(javax.faces.context.FacesContext context)
           
static boolean supportsAccessKeys(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsAdvancedForms(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsAutoCompleteFormElements(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsDisabledFormElements(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsEditing(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsIntrinsicEvents(org.apache.myfaces.trinidad.context.RenderingContext arc)
          See section 5.14 of xhtml modularization.
static boolean supportsNavigation(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsReadonlyFormElements(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsScripting(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns true if the agent supports the Script module.
static boolean supportsSeparateWindow(org.apache.myfaces.trinidad.context.RenderingContext arc)
           
static boolean supportsStyleAttributes(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns true if the style attributes should be rendered for this node.
static boolean supportsTarget(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns true if the agent supports setting the target attribute of other elements.
static boolean supportsTextPresentation(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns true if the agent supports the text presentation module.
static boolean supportsXMLDOM(org.apache.myfaces.trinidad.context.RenderingContext arc)
          Returns true if the agent supports the xmldom
 
Methods inherited from class org.apache.myfaces.trinidad.render.CoreRenderer
delegateRenderer, delegateRendererBegin, delegateRendererEnd, encodeAll, 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, decode, getConvertedValue, getRendersChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSPARENT_GIF

public static final java.lang.String TRANSPARENT_GIF
See Also:
Constant Field Values
Constructor Detail

XhtmlRenderer

protected XhtmlRenderer(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
Method Detail

cloneWithType

public javax.faces.render.Renderer cloneWithType(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
Clone a Renderer instance with a new Type.

Specified by:
cloneWithType in interface org.apache.myfaces.trinidad.render.TypedRenderer

findTypeConstants

protected void findTypeConstants(org.apache.myfaces.trinidad.bean.FacesBean.Type type)

supportsScripting

public static boolean supportsScripting(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns true if the agent supports the Script module.

See section 5.16 of xhtml modularization


supportsEditing

public static boolean supportsEditing(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsAdvancedForms

public static boolean supportsAdvancedForms(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsIntrinsicEvents

public static boolean supportsIntrinsicEvents(org.apache.myfaces.trinidad.context.RenderingContext arc)
See section 5.14 of xhtml modularization.


supportsStyleAttributes

public static boolean supportsStyleAttributes(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns true if the style attributes should be rendered for this node.

Clients should override this method if the the user agent doesn't support style attributes.

See section 5.18 of xhtml modularization


supportsNavigation

public static boolean supportsNavigation(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsTextPresentation

public static boolean supportsTextPresentation(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns true if the agent supports the text presentation module.

See section 5.4.1 of xhtml modularization.


supportsAccessKeys

public static boolean supportsAccessKeys(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsDisabledFormElements

public static final boolean supportsDisabledFormElements(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsReadonlyFormElements

public static final boolean supportsReadonlyFormElements(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsAutoCompleteFormElements

public static final boolean supportsAutoCompleteFormElements(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsSeparateWindow

public static final boolean supportsSeparateWindow(org.apache.myfaces.trinidad.context.RenderingContext arc)

supportsTarget

public static final boolean supportsTarget(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns true if the agent supports setting the target attribute of other elements.

See section 5.12 of xhtml modularization.


supportsXMLDOM

public static boolean supportsXMLDOM(org.apache.myfaces.trinidad.context.RenderingContext arc)
Returns true if the agent supports the xmldom


skipDecode

protected boolean skipDecode(javax.faces.context.FacesContext context)
Overrides:
skipDecode in class org.apache.myfaces.trinidad.render.CoreRenderer

shouldRenderId

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

Overrides:
shouldRenderId in class org.apache.myfaces.trinidad.render.CoreRenderer

renderAllAttributes

protected void renderAllAttributes(javax.faces.context.FacesContext context,
                                   org.apache.myfaces.trinidad.context.RenderingContext arc,
                                   org.apache.myfaces.trinidad.bean.FacesBean bean)
                            throws java.io.IOException
Render the main renderer-specific attributes: "title", "class", "style", and all the Javascript attributes. This will render style attributes.

Throws:
java.io.IOException

renderAllAttributes

protected void renderAllAttributes(javax.faces.context.FacesContext context,
                                   org.apache.myfaces.trinidad.context.RenderingContext arc,
                                   org.apache.myfaces.trinidad.bean.FacesBean bean,
                                   boolean renderStyleAttrs)
                            throws java.io.IOException
Render the main renderer-specific attributes: "title", "class", "style", and all the Javascript attributes. Takes a boolean to determine if renderStyleAttributes should be called, which renders "class", "style"

Throws:
java.io.IOException

renderInlineStyleAttribute

public static void renderInlineStyleAttribute(javax.faces.context.FacesContext context,
                                              org.apache.myfaces.trinidad.context.RenderingContext arc,
                                              java.lang.String style)
                                       throws java.io.IOException
Renders the inline style attribute for the specified node

Throws:
java.io.IOException

renderInlineStyle

protected void renderInlineStyle(javax.faces.context.FacesContext context,
                                 org.apache.myfaces.trinidad.context.RenderingContext arc,
                                 org.apache.myfaces.trinidad.bean.FacesBean bean)
                          throws java.io.IOException
Throws:
java.io.IOException

renderShortDescAttribute

protected void renderShortDescAttribute(javax.faces.context.FacesContext context,
                                        org.apache.myfaces.trinidad.context.RenderingContext arc,
                                        org.apache.myfaces.trinidad.bean.FacesBean bean)
                                 throws java.io.IOException
Throws:
java.io.IOException

renderStyleAttributes

protected void renderStyleAttributes(javax.faces.context.FacesContext context,
                                     org.apache.myfaces.trinidad.context.RenderingContext arc,
                                     org.apache.myfaces.trinidad.bean.FacesBean bean)
                              throws java.io.IOException
Throws:
java.io.IOException

getDefaultStyleClass

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

renderStyleAttributes

protected void renderStyleAttributes(javax.faces.context.FacesContext context,
                                     org.apache.myfaces.trinidad.context.RenderingContext arc,
                                     org.apache.myfaces.trinidad.bean.FacesBean bean,
                                     java.lang.String defaultStyleClass)
                              throws java.io.IOException
When there's a default style class pass it in to this method

Throws:
java.io.IOException

renderEventHandlers

protected void renderEventHandlers(javax.faces.context.FacesContext context,
                                   org.apache.myfaces.trinidad.bean.FacesBean bean)
                            throws java.io.IOException
Render all the Javascript attributes.

Throws:
java.io.IOException

renderHAlign

protected static void renderHAlign(javax.faces.context.FacesContext context,
                                   org.apache.myfaces.trinidad.context.RenderingContext arc,
                                   java.lang.Object hAlign)
                            throws java.io.IOException
Throws:
java.io.IOException

renderPossiblyFormattedText

protected final void renderPossiblyFormattedText(javax.faces.context.FacesContext context,
                                                 java.lang.Object textValue)
                                          throws java.io.IOException
Throws:
java.io.IOException

renderFormattedText

protected final void renderFormattedText(javax.faces.context.FacesContext context,
                                         java.lang.Object textValue)
                                  throws java.io.IOException
Throws:
java.io.IOException

getAbsoluteImageUri

public static java.lang.String getAbsoluteImageUri(javax.faces.context.FacesContext context,
                                                   org.apache.myfaces.trinidad.context.RenderingContext arc,
                                                   java.lang.String imagePath)

getBaseImageUri

protected static java.lang.String getBaseImageUri(javax.faces.context.FacesContext context,
                                                  org.apache.myfaces.trinidad.context.RenderingContext arc)

renderDecorativeIcon

protected final void renderDecorativeIcon(javax.faces.context.FacesContext context,
                                          org.apache.myfaces.trinidad.context.RenderingContext arc,
                                          java.lang.String iconUri,
                                          java.lang.Object width,
                                          java.lang.Object height,
                                          java.lang.Object id,
                                          java.lang.Object altText)
                                   throws java.io.IOException
Renders an icon. If the the specified iconUri is a relative URI, it is appended to the value of the base Image URI. This method may only be called for decorative icons - icons that are purely visual.

Throws:
java.io.IOException

renderDecorativeIcon

protected final void renderDecorativeIcon(javax.faces.context.FacesContext context,
                                          org.apache.myfaces.trinidad.context.RenderingContext arc,
                                          java.lang.String iconUri,
                                          java.lang.Object width,
                                          java.lang.Object height,
                                          java.lang.Object id,
                                          java.lang.Object altText,
                                          javax.faces.component.UIComponent comp)
                                   throws java.io.IOException
Throws:
java.io.IOException

renderVerticalSpacer

protected final void renderVerticalSpacer(javax.faces.context.FacesContext context,
                                          java.lang.Object height,
                                          java.lang.Object id,
                                          javax.faces.component.UIComponent comp)
                                   throws java.io.IOException
Renders a vertical spacer for a specified non-null height.

Throws:
java.io.IOException

renderSpacer

protected final void renderSpacer(javax.faces.context.FacesContext context,
                                  org.apache.myfaces.trinidad.context.RenderingContext arc,
                                  java.lang.String width,
                                  java.lang.String height)
                           throws java.io.IOException
Renders a spacer.

Throws:
java.io.IOException

renderTransparent

protected final void renderTransparent(javax.faces.context.FacesContext context,
                                       org.apache.myfaces.trinidad.context.RenderingContext arc,
                                       java.lang.String width,
                                       java.lang.String height,
                                       boolean needsQuoting,
                                       java.lang.Object id)
                                throws java.io.IOException
Renders a transparent gif using a script to save space.

Throws:
java.io.IOException

renderScriptDeferAttribute

public static void renderScriptDeferAttribute(javax.faces.context.FacesContext context,
                                              org.apache.myfaces.trinidad.context.RenderingContext arc)
                                       throws java.io.IOException
Renders the "defer" attribute for a script element. In order to support partial page rendering, scripts must be rendered using the "defer" attribute to ensure that they are executed in the appropriate context. However, some browsers (eg. IE) do not reliably load scripts which are deferred. This method detects whether the target agent can handle the defer attribute correctly and only renders this attribute when as appropriate.

Note: ResponseWriter.startElement("script", null) must be called before calling this method.

Throws:
java.io.IOException

enableScriptDeferring

public static void enableScriptDeferring(org.apache.myfaces.trinidad.context.RenderingContext arc,
                                         boolean isEnabled)

renderScriptTypeAttribute

public static void renderScriptTypeAttribute(javax.faces.context.FacesContext context,
                                             org.apache.myfaces.trinidad.context.RenderingContext arc)
                                      throws java.io.IOException
Checks whether in screen reader mode, and if so, renders "type" attribute for a script element.

Note: ResponseWriter.startElement("script", null) must be called before calling this method. [ =-= mll added 20-Apr-04 to address bug 3426092 ]

Throws:
java.io.IOException

getShortDesc

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

getStyleClass

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

getInlineStyle

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

getOnclick

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

getOndblclick

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

getOnkeydown

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

getOnkeyup

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

getOnkeypress

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

getOnmousedown

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

getOnmousemove

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

getOnmouseout

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

getOnmouseover

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

getOnmouseup

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


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