This content has been marked as final.
Show 1 reply
-
1. Re: Prefixing id's with
sergeysmirnov Apr 2, 2007 5:42 PM (in response to tbjerch)Actually, the explanation is right in the JSF Specification. The algorithm of UIComponent findComponent is used:
http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/javax/faces/component/UIComponent.html#findComponent(java.lang.String)
As you see, the algorithm presume several attempts to fine the desire id in the component tree.
So, even you have:<f:view> ..... <h:graphicImage id="painter" /> ... <f:subview id="foo"> <h:form id="bar"> ... <a4j:commandButton value="Redraw" reRender="painter" /> </h:form> </f:subview> <f:view>
it will still work. However, it takes extra steps before root UIComponent starts to be the base and the "painter" be found there. I.e. ":painter" helps to shortcut the way