How is the UIViewRoot tree is built ? And when ?

Hello,

I know that at the first visit of a view, the number of children of the UIViewRoot is unknown until the render view phase.

But I'd like to know this number.

Is there a meaning of doing this ?

How is the UIViewRoot tree is built ?

Thanks in advance.

__ _ _ _

bgOnline

[323 byte] By [bgOnlinea] at [2007-10-2 7:31:28]
# 1

> I know that at the first visit of a view, the number

> of children of the UIViewRoot is unknown until the

> render view phase.

Yes.

> But I'd like to know this number.

> Is there a meaning of doing this ?

You can't unless you invent another way to built the tree.

> How is the UIViewRoot tree is built ?

The handler of each JSF tag firstly tries to find the corresponding component

in the view. When it fails to find, it creates a new component.

In a typical case, the handler of f:view can find the corresponding

component; i.e. the view root, whereas the handlers of other tags(h:form,

h:inputText, h:dataTable, and so on) fail and create the components.

See the javadoc of UIComponentTag.doStartTag() and findComponent().

yuki.yoshidaa at 2007-7-16 21:10:56 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...