Advanced Usage

If there is the need to provide a kind of value/label functionality like using a SelectItem in a SelectOneMenu, you have to use the attribute "itemLabelMethod". When using the component like this, the "suggestedItemsMethod" has to return a list of special objects instead of simple Strings. A converter which handles the conversion of a special object into a specific value and vice versa should also be mapped to the component. Have a look:

As a consequence, all suggested items are displayed as a readable concatenation of city, streetname and state of each address. In order to put all the pieces together, the converter has to do some work: