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

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.LabelAndMessageRenderer
All Implemented Interfaces:
java.lang.Cloneable, org.apache.myfaces.trinidad.render.TypedRenderer
Direct Known Subclasses:
InputLabelAndMessageRenderer, PanelLabelAndMessageRenderer

public abstract class LabelAndMessageRenderer
extends XhtmlRenderer


Field Summary
static java.lang.String INLINE_MESSAGE_DEFAULT_GAP
           
static java.lang.String INLINE_MESSAGE_PDA_GAP
           
 
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
LabelAndMessageRenderer(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
           
 
Method Summary
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 getClientId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Returns the client ID.
protected  java.lang.String getDefaultLabelValign(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getLabel(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected abstract  java.lang.String getLabelFor(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean)
          Returns the ID (clientId) of the component that should receive the label.
protected  java.lang.String getLabelInlineStyleKey(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getLabelStyleClass(org.apache.myfaces.trinidad.bean.FacesBean bean)
          This gets the rootStyleClass from the bean, appends ::label to it,
 boolean getRendersChildren()
           
protected  boolean getRequired(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  java.lang.String getRootStyleClass(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  boolean getShowRequired(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  boolean hasMessage(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  boolean hasOwnLabel(org.apache.myfaces.trinidad.bean.FacesBean bean)
          Override and return "true" to indicate that the component has its own internal label - and that therefore there shouldn't be an HTML
protected  boolean isContentEditable(org.apache.myfaces.trinidad.bean.FacesBean bean)
          If it's known that the field content is not editable, return false.
protected  boolean isIndented()
           
protected  boolean labelShowRequired(org.apache.myfaces.trinidad.bean.FacesBean bean)
          Hook for resolving whether we should show the "required" icon.
protected abstract  void renderFieldCellContents(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 renderRootDomElementStyles(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  boolean shouldRenderId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
          Returns true if the component should render an ID.
protected  boolean showAccessKeyOnLabel(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
 
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, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INLINE_MESSAGE_DEFAULT_GAP

public static final java.lang.String INLINE_MESSAGE_DEFAULT_GAP
See Also:
Constant Field Values

INLINE_MESSAGE_PDA_GAP

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

LabelAndMessageRenderer

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

getRendersChildren

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

findTypeConstants

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

renderRootDomElementStyles

protected void renderRootDomElementStyles(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
Throws:
java.io.IOException

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

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

getRootStyleClass

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

hasMessage

protected boolean hasMessage(javax.faces.context.FacesContext context,
                             org.apache.myfaces.trinidad.context.RenderingContext arc,
                             javax.faces.component.UIComponent component,
                             org.apache.myfaces.trinidad.bean.FacesBean bean)

getClientId

protected java.lang.String getClientId(javax.faces.context.FacesContext context,
                                       javax.faces.component.UIComponent component)
Returns the client ID.

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

getDefaultLabelValign

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

renderFieldCellContents

protected abstract void renderFieldCellContents(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
Throws:
java.io.IOException

isContentEditable

protected boolean isContentEditable(org.apache.myfaces.trinidad.bean.FacesBean bean)
If it's known that the field content is not editable, return false. Otherwise, assume it is editable and return true


isIndented

protected boolean isIndented()

hasOwnLabel

protected boolean hasOwnLabel(org.apache.myfaces.trinidad.bean.FacesBean bean)
Override and return "true" to indicate that the component has its own internal label - and that therefore there shouldn't be an HTML

showAccessKeyOnLabel

protected boolean showAccessKeyOnLabel(org.apache.myfaces.trinidad.bean.FacesBean bean)

getLabelFor

protected abstract java.lang.String getLabelFor(javax.faces.context.FacesContext context,
                                                org.apache.myfaces.trinidad.context.RenderingContext arc,
                                                javax.faces.component.UIComponent component,
                                                org.apache.myfaces.trinidad.bean.FacesBean bean)
Returns the ID (clientId) of the component that should receive the label.


getLabelInlineStyleKey

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

labelShowRequired

protected boolean labelShowRequired(org.apache.myfaces.trinidad.bean.FacesBean bean)
Hook for resolving whether we should show the "required" icon.


getShowRequired

protected boolean getShowRequired(org.apache.myfaces.trinidad.bean.FacesBean bean)

getRequired

protected boolean getRequired(org.apache.myfaces.trinidad.bean.FacesBean bean)

getLabel

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

getLabelStyleClass

protected java.lang.String getLabelStyleClass(org.apache.myfaces.trinidad.bean.FacesBean bean)
This gets the rootStyleClass from the bean, appends ::label to it,

Parameters:
bean -
Returns:


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