Travis Reeder wrote:
Working on this ajax stuff, I got to wondering why we don't just have
id's implemented like forceId = true?  Is there any reason why we
can't just have all id's set to the id the user specifies without
prepending stuff to them?

The spec allows ids to be duplicated as long as they are in different naming containers.

In particular, it is possible to use

<f:subview>
  <jsp:include .../>
</f:subview>

and not worry whether any of the ids in the included page are the same as ids in the current page; a Subview is a naming container, so every component in the included page has the subview's id prefixed to it. That ensures that there are no id conflicts.

Prefixing ids with the enclosing naming container's id is also critical in tables (a table is a naming container which pretends to have a different id as its rowIndex changes, so that component in different rows have different prefixes to distinguish them.

Regards,

Simon

Reply via email to