Overview | Library | Tag | Help
| FRAMES NO FRAMES

## RichFaces ( Legacy URL )
Tag 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.

Tag Information
Tag Class | org.richfaces.taglib.SuggestionBoxTag
TagExtraInfo Class | None
Body Content | JSP
Display Name | None

Attributes
Name | Required | Request-time | Type | Description
ajaxSingle | false | false | `java.lang.String` | if "true", submit ONLY one field/link, instead of all form controls
bgcolor | false | false | `java.lang.String` | Deprecated. This attribute sets the background color for the document body or table cells. This attribute sets the background color of the canvas for the document body (the BODY element) or for tables (the TABLE, TR, TH, and TD elements). Additional attributes for specifying text color can be used with the BODY element. This attribute has been deprecated in favor of style sheets for specifying background color information
binding | false | false | `java.lang.String` | The attribute takes a value-binding expression for a component property of a backing bean
border | false | false | `java.lang.String` | This attributes specifies the width (in pixels only) of the frame around a table
bypassUpdates | false | false | `java.lang.String` | If "true", after process validations phase it skips updates of model beans on a force render response. It can be used for validating components input
cellpadding | false | false | `java.lang.String` | This attribute specifies the amount of space between the border of the cell and its contents. If the value of this attribute is a pixel length, all four margins should be this distance from the contents. If the value of the attribute is percentage length, the top and bottom margins should be equally separated from the content based on percentage of the available vertical space, and the left and right margins should be equally separated from the content based on percentage of the available horizontal space
cellspacing | false | false | `java.lang.String` | This attribute specifies how much space the user agent should leave between the table and the column on all four sides. The attribute also specifies the amount of space to leave between cells
converter | false | false | `java.lang.String` | Id of Converter to be used or reference to a Converter
data | false | false | `java.lang.String` | Serialized (on default with JSON) data passed on the client by a developer on AJAX request. It's accessible via "data.foo" syntax
dir | false | false | `java.lang.String` | Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left)
entryClass | false | false | `java.lang.String` | Name of the CSS class for a suggestion entry element (table row)
eventsQueue | false | false | `java.lang.String` | Name of requests queue to avoid send next request before complete other from same event. Can be used to reduce number of requests of frequently events (key press, mouse move etc.)
fetchValue | false | false | `java.lang.String` | A value to set in the target input element on a choice suggestion that isn't shown in the suggestion table. It can be used for descriptive output comments or suggestions. If not set, all text in the suggestion row is set as a value
first | false | false | `java.lang.String` | A zero-relative row number of the first row to display
focus | false | false | `java.lang.String` | id of element to set focus after request completed on client side
for | false | false | `java.lang.String` | id (or full path of id's) of target components, for which this element must provide support. If a target component inside of the same <code>NamingContainer</code> (UIForm, UIData in base implementations), can be simple value of the "id" attribute. For other cases must include id's of <code>NamingContainer</code> components, separated by ':'. For search from the root of components, must be started with ':'.
frame | false | false | `java.lang.String` | void|above|below|hsides|lhs|rhs|vsides|box|border [CI] This attribute specifies which sides of the frame surrounding a table will be visible. Possible values: * void: No sides. This is the default value. * above: The top side only. * below: The bottom side only. * hsides: The top and bottom sides only. * vsides: The right and left sides only. * lhs: The left-hand side only. * rhs: The right-hand side only. * box: All four sides. * border: All four sides
frequency | false | false | `java.lang.String` | Delay (in seconds) before activating the suggestion pop-up
height | true | false | `java.lang.String` | Height of the pop-up window in pixels
id | false | false | `java.lang.String` | Every component may have a unique id that is automatically created if omitted
ignoreDupResponses | false | false | `java.lang.String` | Attribute allows to ignore an Ajax Response produced by a request if the newest 'similar' request is in a queue already. ignoreDupResponses="true" does not cancel the request while it is processed on the server, but just allows to avoid unnecessary updates on the client side if the response isn't actual now
immediate | false | false | `java.lang.String` | A flag indicating that this component value must be converted and validated immediately (that is, during Apply Request Values phase), rather than waiting until a Process Validations phase.
lang | false | false | `java.lang.String` | Code describing the language used in the generated markup for this component
limitToList | false | false | `java.lang.String` | If "true", updates on client side ONLY elements from this 'reRender' property. If "false" (default) updates all rendered by ajax region components
minChars | false | false | `java.lang.String` | Minimal number of chars in input to activate suggestion pop-up
nothingLabel | false | false | `java.lang.String` | "nothingLabel" is inserted to popup list if the autocomplete returns empty list. It isn't selectable and list is closed as always after click on it and nothing is put to input.
onbeforedomupdate | false | false | `java.lang.String` | JavaScript code for call before DOM has been updated on client side
oncomplete | false | false | `java.lang.String` | JavaScript code for call after request completed on client side
onselect | false | false | `java.lang.String` | JavaScript code for call on select suggestion, after update value of target element
onsubmit | false | false | `java.lang.String` | JavaScript code for call before submission of ajax event
param | false | false | `java.lang.String` | Name the HTTP request parameter with the value of input element token. If not set, it be will sent as an input element name. In this case, input will perform validation and update the value
popupClass | false | false | `java.lang.String` | HTML CSS class attribute of element for pop-up suggestion content
popupStyle | false | false | `java.lang.String` | HTML CSS style attribute of element for pop-up suggestion content
reRender | false | false | `java.lang.String` | Id['s] (in format of call UIComponent.findComponent()) of components, rendered in case of AjaxRequest caused by this component. Can be single id, comma-separated list of Id's, or EL Expression with array or Collection
rendered | false | false | `java.lang.String` | If "false", this component is not rendered
requestDelay | false | false | `java.lang.String` | Attribute defines the time (in ms.) that the request will be wait in the queue before it is ready to send. When the delay time is over, the request will be sent to the server or removed if the newest 'similar' request is in a queue already
rowClasses | false | false | `java.lang.String` | A comma-delimited list of CSS style classes that is applied to popup table rows. A space separated list of classes may also be specified for any individual row. The styles are applied, in turn, to each row in the table. For example, if the list has two elements, the first style class in the list is applied to the first row, the second to the second row, the first to the third row, the second to the fourth row, etc. In other words, we keep iterating through the list until we reach the end, and then we start at the beginning again
rowNumber | false | false | `java.lang.String` | rowNumber
rules | false | false | `java.lang.String` | This attribute specifies which rules will appear between cells within a table. The rendering of rules is user agent dependent. Possible values: * none: No rules. This is the default value. * groups: Rules will appear between row groups (see THEAD, TFOOT, and TBODY) and column groups (see COLGROUP and COL) only. * rows: Rules will appear between rows only. * cols: Rules will appear between columns only. * all: Rules will appear between all rows and columns
selectValueClass | false | false | `java.lang.String` | Name of the CSS class for a selected suggestion entry element (table cell)
selectedClass | false | false | `java.lang.String` | Name of the CSS class for a selected suggestion entry element (table row)
selfRendered | false | false | `java.lang.String` | If "true", forces active Ajax region render response directly from stored components tree, bypasses page processing. Can be used for increase performance. Also, must be set to 'true' inside iteration components, such as dataTable.
shadowDepth | false | false | `java.lang.String` | Pop-up shadow depth for suggestion content
shadowOpacity | false | false | `java.lang.String` | Attribute defines shadow opacity for suggestion content
status | false | false | `java.lang.String` | ID (in format of call UIComponent.findComponent()) of Request status component
style | false | false | `java.lang.String` | CSS style(s) is/are to be applied when this component is rendered
styleClass | false | false | `java.lang.String` | Corresponds to the HTML class attribute
suggestionAction | false | false | `java.lang.String` | Method calls an expression to get a collection of suggestion data on request. It must have one parameter with a type of Object with content of input component and must return any type allowed for <h:datatable>
summary | false | false | `java.lang.String` | This attribute provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille
timeout | false | false | `java.lang.String` | Response waiting time on a particular request. If a response is not received during this time, the request is aborted
title | false | false | `java.lang.String` | Advisory title information about markup elements generated for this component
tokens | false | false | `java.lang.String` | The list (or single value) of symbols which can be used for division chosen of suggestion pop-up values in a target element. After input of a symbol from the list suggestion pop-up it is caused again
upValue | false | false | `java.lang.String` | upValue
value | false | false | `java.lang.String` | The initial value to set when rendered for the first time
var | false | false | `java.lang.String` | A request-scope attribute via which the data object for the current row will be used when iterating
width | true | false | `java.lang.String` | Width of the pop-up window in pixels
zindex | false | false | `java.lang.String` | Attribute is similar to the standard HTML attribute and can specify window placement relative to the content

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.