com.sun.rave.web.ui.component
Interface ComplexComponent

All Known Subinterfaces:
ListManager
All Known Implementing Classes:
AddRemove, AddRemoveBase, Button, Calendar, CalendarBase, DropDown, DropDownBase, EditableList, Field, Hyperlink, IconHyperlink, IconHyperlinkBase, ImageHyperlink, ImageHyperlinkBase, Listbox, ListboxBase, ListSelector, OrderableList, PasswordField, PasswordFieldBase, Property, Tab, TabBase, TextArea, TextAreaBase, TextField, TextFieldBase, Upload, UploadBase

public interface ComplexComponent

Most components whose renderers write more than one HTML element need to implement this interface, which exists to allow for a distinction between the component ID and the ID of the primary element that can recieve user input or focus. The latter is needed to allow the application to maintain focus, and to set the forattribute on labels.


Method Summary
 java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
          Implement this method so that it returns the DOM ID of the HTML element which should receive focus when the component receives focus, and to which a component label should apply.
 

Method Detail

getPrimaryElementID

java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
Implement this method so that it returns the DOM ID of the HTML element which should receive focus when the component receives focus, and to which a component label should apply. Usually, this is the first element that accepts input.

Parameters:
context - The FacesContext for the request
Returns:
The client id, also the JavaScript element id