I am not sure what a session scoped component binding is.

A backing bean that is session scoped that has a property that is used
for component binding.

When using component binding (<ns:component binding="#{...}">), that
value should NEVER be persisted longer than that lifecycle and
rendering of the page.

The reason why this is a common cause of duplicate ID errors is that
a component's ID must be unique per naming container. Common naming
containers are data tables, ui:repeat (facelets), subView, and form.
When a component is bound to a value binding the code works as
follows:

- get the value binding
- see if the value is null
- if null, create the component and then set the value binding to this
new component value
- if not null, insert this component into the component tree (return the value)

Therefore, if you have a component that is bound with no ID, it will
get a generated ID that is unique only for that UIViewRoot component.
If you use that component again in a different view, the ID is not
guaranteed be unique as the new view may (and will in MyFaces)
generate that same ID over again. Thus giving you a duplicate ID
error.

Reply via email to