Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Before I answer that, I want to point out that JSF backing beans are not Controllers.
In JSF, the Controllers are in the FacesServlet and in the tags. Developers only supply Models (backing beans) and View Templates (xhtml). The executable logic in backing beans is not Controller code. The sole purpose of an MVC Controller is to synchronize data between a Model and a View, not to provide business logic.
Now that I've finished being pedantic, here's your answer:
JSF uses a concept called a naming container. Normally, every ID in an XML file must be unique, per the XML spec, but JSF View Templates are reduced to HTML code and certain constructs end up up producing more than 1 id-associated element. The most obvious example of this would be a field within a dataTable, where the field would be generated for every row in the displayed HTML TABLE.
To work around this, the true ID's of these objects is not the same ID as the one you specified in your View Template. Instead, the name of the element is concatenated with the name of its naming container. And if that naming container appears within another naming container, that name is concatenated as well.
So, for example, for the text control named "ssn" on the third row of table "t1" within form "inforForm", the actual ID would be something like "infoForm:t1:2:ssn".
Note that if you do not supply an explicit ID for a JSF element, one will be automatically generated. For example: "j_132". These IDs cannot be reliably predicted, however, and are subject to change without warning, so if you need a predictable ID, supply one explicitly.
Sometimes the only way things ever got fixed is because people became uncomfortable.
This guy is skipping without a rope. At least, that's what this tiny ad said:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth