https://javaserverfaces.dev.java.net/nonav/docs/2.0/pdldocs/facelets/h/outputText.html says:
[b]If the "styleClass", "style", "dir" or "lang" attributes are present, render a "span" element.[/b]
Shouldn't "id" be in that list of attributes that cause it to be a span? This is actually an important point because you need an id when you use f:ajax. So, the consequence of "id" resulting in a "span" is that you cannot directly use f:ajax to update HTML attribute values such as with <h:body bgcolor="#{user.favoriteBackground}"/>. This point is obvious to experienced Ajax developers, but the point of f:ajax is that it is accessible to non-Ajax programmers, so the PDL docs should explicitly say that "id" causes h:outputText to be a "span", IMHO. If the experts agree, I will report it as a documentation bug.
I would also like the documentation to explicitly say that in 2.0 facelets pages, if you don't use any attributes other than "value", you can almost always replace <h:outputText value="#{whatever}"/> with #{whatever}.
Cheers-
- Marty
JSF 2.0 Training Course:
http://courses.coreservlets.com/public-courses/jsf2/
[Message sent by forum member 'martyhall' (hall_at_coreservlets.com)]
http://forums.java.net/jive/thread.jspa?messageID=386830