org.openfaces.renderkit.input
Class DropDownFieldRenderer

java.lang.Object
  extended by javax.faces.render.Renderer
      extended by org.openfaces.renderkit.RendererBase
          extended by org.openfaces.renderkit.input.DropDownComponentRenderer
              extended by org.openfaces.renderkit.input.DropDownFieldRenderer
All Implemented Interfaces:
AjaxPortionRenderer
Direct Known Subclasses:
SelectOneMenuRenderer, SuggestionFieldRenderer

public class DropDownFieldRenderer
extends DropDownComponentRenderer
implements AjaxPortionRenderer


Field Summary
static java.lang.String DISPLAYED_VALUE_ATTR
           
static java.lang.String ORIGINAL_VALUE_ATTR
           
 
Fields inherited from class org.openfaces.renderkit.input.DropDownComponentRenderer
BUTTON_SUFFIX, FIELD_SUFFIX, POPUP_SUFFIX
 
Constructor Summary
DropDownFieldRenderer()
           
 
Method Summary
 void decode(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
 JSONObject encodeAjaxPortion(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String portionName, JSONObject jsonParam)
          This method is required for inner components rendering in case when parent component does not know which HTML appearance inner component should have.
 void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
 void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent uiComponent)
           
 java.lang.Object getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object submittedValue)
           
 
Methods inherited from class org.openfaces.renderkit.input.DropDownComponentRenderer
encodeEnd, getRendersChildren
 
Methods inherited from class javax.faces.render.Renderer
convertClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ORIGINAL_VALUE_ATTR

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

DISPLAYED_VALUE_ATTR

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

DropDownFieldRenderer

public DropDownFieldRenderer()
Method Detail

getConvertedValue

public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIComponent component,
                                          java.lang.Object submittedValue)
Overrides:
getConvertedValue in class javax.faces.render.Renderer

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context,
                        javax.faces.component.UIComponent component)
                 throws java.io.IOException
Overrides:
encodeBegin in class DropDownComponentRenderer
Throws:
java.io.IOException

decode

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

encodeChildren

public void encodeChildren(javax.faces.context.FacesContext context,
                           javax.faces.component.UIComponent uiComponent)
                    throws java.io.IOException
Overrides:
encodeChildren in class DropDownComponentRenderer
Throws:
java.io.IOException

encodeAjaxPortion

public JSONObject encodeAjaxPortion(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.String portionName,
                                    JSONObject jsonParam)
                             throws java.io.IOException
Description copied from interface: AjaxPortionRenderer
This method is required for inner components rendering in case when parent component does not know which HTML appearance inner component should have. For example some components may have additional initialization javascript along with their HTML representations.

Specified by:
encodeAjaxPortion in interface AjaxPortionRenderer
Parameters:
context - instance of FacesContext
component - parent component for which inner controls should be rendered
portionName - actually a server-side id for the inner component to be rendered. In further, there may be an extension for this method to support not only inner components rendering, but data retrieval too. Or maybe other method will be declared.
jsonParam - the JSON object that is passed as a parameter to O$.Ajax.requestComponentPortions on the client-side, or null if no parameter was passed.
Throws:
java.io.IOException - propagates any IO exceptions that might occur inside of this method


Copyright © 1998-2010 TeamDev Ltd. All Rights Reserved.