I'm trying to understand how to add JSF capabilities to an HTML5 document (instead of doing the other way around), and now I see that if I add a jsf:id
attribute to an element, the attribute is rendered in the browser as-is (jsf:id
) and not as simply id
(it doesn't happend with jsf:value
in a <input>
element, which is rendered as simply value
). And now I've seen that some people add both attributes id
and jsf:id
. Now i am confused.
I understand that I need id
if, for instance, I want to access that element via jQuery, but why do I need jsf:id
then? couldn't I just add the jsf
namespace to other attributein the same element so that the element is processed by the JSF engine, or is jsf:id
useful for something else (in the managed bean maybe)?
Thanks