Monday, June 25, 2007

JSF component id and clientId

JSF components have a clientId as well as an id.

The id of a component is the id that it chooses to give itself. This may be specified or can also be auto generated by the JSF framework.

The clientId is the id that is transmitted to the web client. For a component, it's clientId is the clientId of the closest parent that implements NamingContainer followed by the JSF seperator char followed by the clientId of this component.

A little code snippet that implements getClientId().



click on the image to get a better view

No comments: