---- "Jesse Alexander (KSFH 323)" <[EMAIL PROTECTED]> schrieb: > Forcing ID's is not too expensive, if you start early with it. > > It's not only tools like Selenium and BadBoy that "might need" fixed > ID's. Also Load&Performance Tools > depend on either name or id-attribute and if those attributes change > between test-runs or (even worse) between > page-views, then you can imagine that you get high bills from the team > preparing and executing the tests... > > It would be nice though, if some setting would tell the JSF-impls to > force ID's on all input- and command-related > components. THEN the developer would "automatically" specify the IDs > from the very beginnning.
I agree with both your points. I cannot see any way for tools to sanely run against the html without stable ids, but JSF dynamically-assigned ids are *not* stable. In a recent project I wrote a PhaseListener that walked the component tree after render and looked for components with specific classes. If one was found that had an id starting with "_" then an exception was thrown. Clearly, not every component type needs a fixed id. For example, a UIInput should have an id, but an HtmlOutputLabel does not need one (and requiring an explicit id for each label would be unreasonable). As you say, it would be nice to have this kind of functionality built-in to MyFaces. Regards, Simon

