org.apache.myfaces.html5.renderkit.input.delegate
Class HtmlTextInputSuggestionRendererHelper

java.lang.Object
  extended by org.apache.myfaces.html5.renderkit.input.delegate.HtmlTextInputSuggestionRendererHelper
All Implemented Interfaces:
SuggestionRendererHelper
Direct Known Subclasses:
HtmlDataListSuggestionRendererHelper

public class HtmlTextInputSuggestionRendererHelper
extends Object
implements SuggestionRendererHelper

Implementation of SuggestionRendererHelper for usage in HtmlInputTexts.

Author:
Ali Ok

Constructor Summary
HtmlTextInputSuggestionRendererHelper()
           
 
Method Summary
 void checkSuggestions(javax.faces.component.UIComponent uiComponent)
          Check if suggestion conditions are OK.
protected  Collection<javax.faces.model.SelectItem> extractSelectItemsCollectionFromObject(Object objSuggestions)
           
protected  List<javax.faces.model.SelectItem> getSelectItemsList(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
           
 void renderDataList(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
          Renders the datalist.
protected  void renderDataListBegin(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
           
protected  void renderDataListEnd(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
           
protected  void renderDataListOptions(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter)
           
protected  void renderOptionsFromSelectItemsCollection(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, Collection<javax.faces.model.SelectItem> selectItemsCollection, javax.faces.convert.Converter converter)
           
protected  void renderOptionsOfChildren(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, javax.faces.convert.Converter converter)
           
protected  void renderOptionsOfSuggestionsAttr(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent uiComponent, javax.faces.convert.Converter converter)
           
 boolean shouldGenerateDatalist(javax.faces.component.UIComponent uiComponent)
          Returns true if a datalist should be generated for given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlTextInputSuggestionRendererHelper

public HtmlTextInputSuggestionRendererHelper()
Method Detail

checkSuggestions

public void checkSuggestions(javax.faces.component.UIComponent uiComponent)
Description copied from interface: SuggestionRendererHelper
Check if suggestion conditions are OK. For example, if 'datalist' is defined, then other suggestion options(with f:selectItem(s) children or 'suggestions' attribute) should not be used.

Specified by:
checkSuggestions in interface SuggestionRendererHelper

shouldGenerateDatalist

public boolean shouldGenerateDatalist(javax.faces.component.UIComponent uiComponent)
Description copied from interface: SuggestionRendererHelper
Returns true if a datalist should be generated for given component.

Specified by:
shouldGenerateDatalist in interface SuggestionRendererHelper

renderDataList

public void renderDataList(javax.faces.context.FacesContext facesContext,
                           javax.faces.component.UIComponent component)
                    throws IOException
Description copied from interface: SuggestionRendererHelper
Renders the datalist.

Implementations of this method should not render any other markup.

Specified by:
renderDataList in interface SuggestionRendererHelper
Throws:
IOException

renderDataListBegin

protected void renderDataListBegin(javax.faces.context.FacesContext facesContext,
                                   javax.faces.component.UIComponent component)
                            throws IOException
Throws:
IOException

renderDataListOptions

protected void renderDataListOptions(javax.faces.context.FacesContext facesContext,
                                     javax.faces.component.UIComponent component,
                                     javax.faces.convert.Converter converter)
                              throws IOException
Throws:
IOException

renderDataListEnd

protected void renderDataListEnd(javax.faces.context.FacesContext facesContext,
                                 javax.faces.component.UIComponent component)
                          throws IOException
Throws:
IOException

renderOptionsOfSuggestionsAttr

protected void renderOptionsOfSuggestionsAttr(javax.faces.context.FacesContext facesContext,
                                              javax.faces.component.UIComponent uiComponent,
                                              javax.faces.convert.Converter converter)
                                       throws IOException
Throws:
IOException

extractSelectItemsCollectionFromObject

protected Collection<javax.faces.model.SelectItem> extractSelectItemsCollectionFromObject(Object objSuggestions)

renderOptionsOfChildren

protected void renderOptionsOfChildren(javax.faces.context.FacesContext facesContext,
                                       javax.faces.component.UIComponent component,
                                       javax.faces.convert.Converter converter)
                                throws IOException
Throws:
IOException

renderOptionsFromSelectItemsCollection

protected void renderOptionsFromSelectItemsCollection(javax.faces.context.FacesContext facesContext,
                                                      javax.faces.component.UIComponent component,
                                                      Collection<javax.faces.model.SelectItem> selectItemsCollection,
                                                      javax.faces.convert.Converter converter)
                                               throws IOException
Throws:
IOException

getSelectItemsList

protected List<javax.faces.model.SelectItem> getSelectItemsList(javax.faces.context.FacesContext facesContext,
                                                                javax.faces.component.UIComponent component)


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.