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

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.ValueRenderer
                  extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValueRenderer
                      extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer
                          extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormInputRenderer
                              extended by org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectManyRenderer
All Implemented Interfaces:
java.lang.Cloneable, org.apache.myfaces.trinidad.render.TypedRenderer
Direct Known Subclasses:
SelectManyShuttleRenderer, SimpleSelectManyCheckboxRenderer, SimpleSelectManyListboxRenderer

public abstract class SimpleSelectManyRenderer
extends FormInputRenderer

Renderer for SelectMany listboxes.


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
SimpleSelectManyRenderer(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
           
 
Method Summary
protected  void encodeAllAsElement(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 abstract  void encodeElementContent(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.util.List<javax.faces.model.SelectItem> selectItems, int[] selectedIndices, javax.faces.convert.Converter converter, boolean valuePassThru)
          Encode the content of a SelectMany component.
protected  void findTypeConstants(org.apache.myfaces.trinidad.bean.FacesBean.Type type)
           
 java.lang.Object getConvertedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object submittedValue)
          Support the following types of values: Object[] (that contains strings), String[], List (that contains strings).
protected  javax.faces.convert.Converter getDefaultConverter(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.bean.FacesBean bean)
          Override to return a Converter for the items in the value, not the value itself.
protected  java.lang.String getRequiredMessageKey()
           
protected  int[] getSelectedIndices(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean, java.util.List<javax.faces.model.SelectItem> selectItems, javax.faces.convert.Converter converter, boolean valuePassThru)
          Return all the selected indices, in sorted order.
protected  java.util.List<javax.faces.model.SelectItem> getSelectItems(javax.faces.component.UIComponent component, javax.faces.convert.Converter converter)
           
 java.lang.Object getSubmittedValue(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
           
protected  boolean getValuePassThru(org.apache.myfaces.trinidad.bean.FacesBean bean)
           
protected  boolean isReorderable()
          Returns true if the renderer cares about order.
protected  void renderBetweenNonElements(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 renderNonElementContent(javax.faces.context.FacesContext context, org.apache.myfaces.trinidad.context.RenderingContext arc, javax.faces.component.UIComponent component, org.apache.myfaces.trinidad.bean.FacesBean bean)
           
 
Methods inherited from class org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormInputRenderer
getContentStyleClass, getRootStyleClass, getShowRequired, getSimple, renderAllAttributes, renderDisabledAttribute, renderId, renderRootDomElementStyles, shouldRenderName
 
Methods inherited from class org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer
encodeAll, encodeAllAsNonElement, getContentStyle, getDefaultStyleClass, getHiddenLabel, getLabel, getOnblur, getOnchange, getOnfocus, getRendersChildren, isAutoSubmit, isHiddenLabelRequired, renderAsElement, renderEventHandlers, renderFormEventHandlers, renderReadOnlyAsElement, renderShortDescAsHiddenLabel
 
Methods inherited from class org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValueRenderer
addOnSubmitConverterValidators, decode, getConvertedString, getDisabled, getReadOnly, getRequired, getSubmittedValue, getValidators, isImmediate, shouldRenderId, wasSubmitted
 
Methods inherited from class org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ValueRenderer
getConverter, getValue, getValueBinding
 
Methods inherited from class org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer
cloneWithType, enableScriptDeferring, getAbsoluteImageUri, getBaseImageUri, getInlineStyle, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getShortDesc, getStyleClass, renderAllAttributes, renderDecorativeIcon, renderDecorativeIcon, 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, renderStyleClass, renderStyleClasses, setRenderingProperty, toChar, toInt, toLong, toString, toUri
 
Methods inherited from class javax.faces.render.Renderer
convertClientId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSelectManyRenderer

public SimpleSelectManyRenderer(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 FormInputRenderer

getConvertedValue

public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIComponent component,
                                          java.lang.Object submittedValue)
                                   throws javax.faces.convert.ConverterException
Support the following types of values: Object[] (that contains strings), String[], List (that contains strings). (selected values)

Overrides:
getConvertedValue in class EditableValueRenderer
Parameters:
context - the FacesContext
component - the component
Throws:
javax.faces.convert.ConverterException

getSubmittedValue

public java.lang.Object getSubmittedValue(javax.faces.context.FacesContext context,
                                          javax.faces.component.UIComponent component)
Overrides:
getSubmittedValue in class EditableValueRenderer

getDefaultConverter

protected javax.faces.convert.Converter getDefaultConverter(javax.faces.context.FacesContext context,
                                                            org.apache.myfaces.trinidad.bean.FacesBean bean)
Override to return a Converter for the items in the value, not the value itself.

Overrides:
getDefaultConverter in class ValueRenderer

getSelectItems

protected java.util.List<javax.faces.model.SelectItem> getSelectItems(javax.faces.component.UIComponent component,
                                                                      javax.faces.convert.Converter converter)

encodeAllAsElement

protected void encodeAllAsElement(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:
encodeAllAsElement in class FormElementRenderer
Throws:
java.io.IOException

encodeElementContent

protected abstract void encodeElementContent(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.util.List<javax.faces.model.SelectItem> selectItems,
                                             int[] selectedIndices,
                                             javax.faces.convert.Converter converter,
                                             boolean valuePassThru)
                                      throws java.io.IOException
Encode the content of a SelectMany component.

Parameters:
context - the FacesContext
arc - the AdfRenderingContext
component - the UIComponent
bean - the FacesBean
selectItems - a List of SelectItem instances
selectItems - a List of SelectItem instances
Throws:
java.io.IOException

renderNonElementContent

protected void renderNonElementContent(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:
renderNonElementContent in class FormElementRenderer
Throws:
java.io.IOException

renderBetweenNonElements

protected void renderBetweenNonElements(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

getRequiredMessageKey

protected java.lang.String getRequiredMessageKey()
Overrides:
getRequiredMessageKey in class EditableValueRenderer

getValuePassThru

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

isReorderable

protected boolean isReorderable()
Returns true if the renderer cares about order.


getSelectedIndices

protected int[] getSelectedIndices(javax.faces.context.FacesContext context,
                                   javax.faces.component.UIComponent component,
                                   org.apache.myfaces.trinidad.bean.FacesBean bean,
                                   java.util.List<javax.faces.model.SelectItem> selectItems,
                                   javax.faces.convert.Converter converter,
                                   boolean valuePassThru)
Return all the selected indices, in sorted order. (There may be included -1's in case of an error)



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