org.richfaces.component.html
Class HtmlSuggestionBox
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIData
org.richfaces.component.UISuggestionBox
org.richfaces.component.html.HtmlSuggestionBox
- All Implemented Interfaces:
- javax.faces.component.NamingContainer, javax.faces.component.StateHolder, org.ajax4jsf.framework.ajax.AjaxComponent
public class HtmlSuggestionBox
- extends UISuggestionBox
Component-Type org.richfaces.SuggestionBox
Component-Family org.richfaces.SuggestionBox
Renderer-Type org.richfaces.SuggestionBox
This element adds "on-keypress" suggestions capabilites to any input text component (like <h:inputText>).
It creates a pop-up window for a input field component pointed to by the "for" attribute.
For an ordinary request, render a hidden HTML <div> element and the necessary JavaScript code.
When input to the target field exceeds the "minChars" property (default is 1), perform an AJAX request with
the value current entered. If the AJAX request is detected and the request parameters map contains the client ID of this component,
call a method defined by suggestionAction, and use it to return a value as data for render table, same as <h:dataTable>.
In this case, the component then works the same as an ordinary dataTable. The rendered table is inserted in the pop-up area and is used for suggestion prompts
for input element. If a user clicks on such a table row, its text (or value defined by fetchValue) is inserted as the value of the input field.
Fields inherited from interface org.ajax4jsf.framework.ajax.AjaxComponent |
AJAX_COMPONETT_PARAMETER |
Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
Methods inherited from class javax.faces.component.UIData |
encodeBegin, getClientId, getFirst, getFooter, getHeader, getRowCount, getRowData, getRowIndex, getRows, getValue, getVar, isRowAvailable, processDecodes, processUpdates, processValidators, setFirst, setFooter, setHeader, setRowIndex, setRows, setValue, setValueBinding, setVar |
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT_TYPE
public static final java.lang.String COMPONENT_TYPE
- See Also:
- Constant Field Values
COMPONENT_FAMILY
public static final java.lang.String COMPONENT_FAMILY
- See Also:
- Constant Field Values
HtmlSuggestionBox
public HtmlSuggestionBox()
- Constructor to init default renderers
setWidth
public void setWidth(java.lang.String __width)
getWidth
public java.lang.String getWidth()
setDir
public void setDir(java.lang.String __dir)
getDir
public java.lang.String getDir()
setBypassUpdates
public void setBypassUpdates(boolean __bypassUpdates)
isBypassUpdates
public boolean isBypassUpdates()
setPopupClass
public void setPopupClass(java.lang.String __popupClass)
getPopupClass
public java.lang.String getPopupClass()
setLimitToList
public void setLimitToList(boolean __limitToList)
isLimitToList
public boolean isLimitToList()
setStyle
public void setStyle(java.lang.String __style)
getStyle
public java.lang.String getStyle()
setShadowOpacity
public void setShadowOpacity(java.lang.String __shadowOpacity)
getShadowOpacity
public java.lang.String getShadowOpacity()
setFor
public void setFor(java.lang.String __for)
- Specified by:
setFor
in class UISuggestionBox
getFor
public java.lang.String getFor()
- Specified by:
getFor
in class UISuggestionBox
setSummary
public void setSummary(java.lang.String __summary)
getSummary
public java.lang.String getSummary()
setTimeout
public void setTimeout(int __timeout)
getTimeout
public int getTimeout()
setConverter
public void setConverter(javax.faces.convert.Converter __converter)
- Specified by:
setConverter
in class UISuggestionBox
getConverter
public javax.faces.convert.Converter getConverter()
- Specified by:
getConverter
in class UISuggestionBox
setLang
public void setLang(java.lang.String __lang)
getLang
public java.lang.String getLang()
setCellspacing
public void setCellspacing(java.lang.String __cellspacing)
getCellspacing
public java.lang.String getCellspacing()
setShadowDepth
public void setShadowDepth(java.lang.String __shadowDepth)
getShadowDepth
public java.lang.String getShadowDepth()
setFetchValue
public void setFetchValue(java.lang.Object __fetchValue)
getFetchValue
public java.lang.Object getFetchValue()
setEntryClass
public void setEntryClass(java.lang.String __entryClass)
- Specified by:
setEntryClass
in class UISuggestionBox
getEntryClass
public java.lang.String getEntryClass()
- Specified by:
getEntryClass
in class UISuggestionBox
- Returns:
setOnselect
public void setOnselect(java.lang.String __onselect)
getOnselect
public java.lang.String getOnselect()
setSelfRendered
public void setSelfRendered(boolean __selfRendered)
- Specified by:
setSelfRendered
in class UISuggestionBox
isSelfRendered
public boolean isSelfRendered()
- Specified by:
isSelfRendered
in class UISuggestionBox
setCellpadding
public void setCellpadding(java.lang.String __cellpadding)
- Specified by:
setCellpadding
in class UISuggestionBox
getCellpadding
public java.lang.String getCellpadding()
- Specified by:
getCellpadding
in class UISuggestionBox
setRowClasses
public void setRowClasses(java.lang.String __rowClasses)
- Specified by:
setRowClasses
in class UISuggestionBox
getRowClasses
public java.lang.String getRowClasses()
- Specified by:
getRowClasses
in class UISuggestionBox
- Returns:
setTitle
public void setTitle(java.lang.String __title)
getTitle
public java.lang.String getTitle()
setOncomplete
public void setOncomplete(java.lang.String __oncomplete)
getOncomplete
public java.lang.String getOncomplete()
setRules
public void setRules(java.lang.String __rules)
getRules
public java.lang.String getRules()
setPopupStyle
public void setPopupStyle(java.lang.String __popupStyle)
getPopupStyle
public java.lang.String getPopupStyle()
setSuggestionAction
public void setSuggestionAction(javax.faces.el.MethodBinding __suggestionAction)
- Specified by:
setSuggestionAction
in class UISuggestionBox
getSuggestionAction
public javax.faces.el.MethodBinding getSuggestionAction()
- Specified by:
getSuggestionAction
in class UISuggestionBox
setReRender
public void setReRender(java.lang.Object __reRender)
getReRender
public java.lang.Object getReRender()
setStyleClass
public void setStyleClass(java.lang.String __styleClass)
getStyleClass
public java.lang.String getStyleClass()
setHeight
public void setHeight(java.lang.String __height)
getHeight
public java.lang.String getHeight()
setAjaxSingle
public void setAjaxSingle(boolean __ajaxSingle)
isAjaxSingle
public boolean isAjaxSingle()
setAlign
public void setAlign(java.lang.String __align)
getAlign
public java.lang.String getAlign()
setSelectedClass
public void setSelectedClass(java.lang.String __selectedClass)
getSelectedClass
public java.lang.String getSelectedClass()
setBorder
public void setBorder(java.lang.String __border)
- Specified by:
setBorder
in class UISuggestionBox
getBorder
public java.lang.String getBorder()
- Specified by:
getBorder
in class UISuggestionBox
- Returns:
setBgcolor
public void setBgcolor(java.lang.String __bgcolor)
getBgcolor
public java.lang.String getBgcolor()
setSelectValueClass
public void setSelectValueClass(java.lang.String __selectValueClass)
- Specified by:
setSelectValueClass
in class UISuggestionBox
getSelectValueClass
public java.lang.String getSelectValueClass()
- Specified by:
getSelectValueClass
in class UISuggestionBox
- Returns:
setFrequency
public void setFrequency(double __frequency)
getFrequency
public double getFrequency()
setTokens
public void setTokens(java.lang.Object __tokens)
getTokens
public java.lang.Object getTokens()
setStatus
public void setStatus(java.lang.String __status)
getStatus
public java.lang.String getStatus()
setRequestDelay
public void setRequestDelay(int __requestDelay)
getRequestDelay
public int getRequestDelay()
setEventsQueue
public void setEventsQueue(java.lang.String __eventsQueue)
getEventsQueue
public java.lang.String getEventsQueue()
setFrame
public void setFrame(java.lang.String __frame)
getFrame
public java.lang.String getFrame()
setImmediate
public void setImmediate(boolean __immediate)
- Specified by:
setImmediate
in class UISuggestionBox
isImmediate
public boolean isImmediate()
- Specified by:
isImmediate
in class UISuggestionBox
setData
public void setData(java.lang.Object __data)
getData
public java.lang.Object getData()
setParam
public void setParam(java.lang.String __param)
getParam
public java.lang.String getParam()
setMinChars
public void setMinChars(java.lang.String __minChars)
getMinChars
public java.lang.String getMinChars()
setIgnoreDupResponses
public void setIgnoreDupResponses(boolean __ignoreDupResponses)
isIgnoreDupResponses
public boolean isIgnoreDupResponses()
getFamily
public java.lang.String getFamily()
- Overrides:
getFamily
in class javax.faces.component.UIData
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState
in interface javax.faces.component.StateHolder
- Overrides:
saveState
in class javax.faces.component.UIData
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
- Specified by:
restoreState
in interface javax.faces.component.StateHolder
- Overrides:
restoreState
in class javax.faces.component.UIData
Copyright © 2007. All Rights Reserved.