Hi. Some time ago I was wondering if you could access a component by its
id like in javascript with getElemetById.
I just found that there's this findComponent in the UIViewRoot which
i guess would work like getElementById.
Now, my question is if you have a native html tag (lets say a DIV)
with an id, would it get mapped into the FacesContext tree ?
Or only
jsf native components get mapped in the FacesContext.
I wonder if something like this would work:
<div id="someDiv">
....
</div>
--
FacesContext fc = FacesContext.getCurrentInstance();
UIViewRoot view = fc.getViewRoot();
UIComponent div = (UIComponent)view.findComponent("someDiv");
div.setStyle("border: 1px solid red");