You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by James Kennard <Ja...@scisys.co.uk> on 2011/10/13 09:48:53 UTC

AbstractHtmlPanelTabbedPane#getUIComponent - what is it doing?

Can anyone explain what the private method
AbstractHtmlPanelTabbedPane#getUIComponent is doing?

 

In instances where it is passed a UINamingContainer or UIForm, it
iterates over the children, and ultimately returns the last child it
finds (recursively calling itself for each child). What I don't
understand is why it needs to do this. I'm also unsure as to what a
UINamingContainer is, I've read the JavaDocs, but didn't find them very
enlightening - although that could just be me!

 

Thanks

 

James.

 



SciSys UK Limited. Registered in England and Wales No. 4373530.
Registered Office: Methuen Park, Chippenham, Wiltshire SN14 0GB, UK.
 
Before printing, please think about the environment.


RE: AbstractHtmlPanelTabbedPane#getUIComponent - what is it doing?

Posted by James Kennard <Ja...@scisys.co.uk>.
Thanks Mike,

I think that sort of explains it - especially having now had a quick look at the Renderer. Really appreciate your help!

-----Original Message-----
From: Mike Kienenberger [mailto:mkienenb@gmail.com] 
Sent: 13 October 2011 17:22
To: MyFaces Development
Subject: Re: AbstractHtmlPanelTabbedPane#getUIComponent - what is it doing?

In the most basic form, a UINamingContainer is what generates the x:
prefix in your component ids.

ie, form:something:somethingelse:_id12 has three UINamingContainers:
form, something, somethingelse.

In more technical terms, it creates a new namespace for the ids of the
components that it contains, so that those ids only need to be unique
inside the container.

On Thu, Oct 13, 2011 at 3:48 AM, James Kennard
<Ja...@scisys.co.uk> wrote:
> Can anyone explain what the private method
> AbstractHtmlPanelTabbedPane#getUIComponent is doing?
>
>
>
> In instances where it is passed a UINamingContainer or UIForm, it iterates
> over the children, and ultimately returns the last child it finds
> (recursively calling itself for each child). What I don't understand is why
> it needs to do this. I'm also unsure as to what a UINamingContainer is, I've
> read the JavaDocs, but didn't find them very enlightening - although that
> could just be me!
>
>
>
> Thanks
>
>
>
> James.
>
>
>
>
> SciSys UK Limited. Registered in England and Wales No. 4373530.
> Registered Office: Methuen Park, Chippenham, Wiltshire SN14 0GB, UK.
>
> Before printing, please think about the environment.


Re: AbstractHtmlPanelTabbedPane#getUIComponent - what is it doing?

Posted by Mike Kienenberger <mk...@gmail.com>.
In the most basic form, a UINamingContainer is what generates the x:
prefix in your component ids.

ie, form:something:somethingelse:_id12 has three UINamingContainers:
form, something, somethingelse.

In more technical terms, it creates a new namespace for the ids of the
components that it contains, so that those ids only need to be unique
inside the container.

On Thu, Oct 13, 2011 at 3:48 AM, James Kennard
<Ja...@scisys.co.uk> wrote:
> Can anyone explain what the private method
> AbstractHtmlPanelTabbedPane#getUIComponent is doing?
>
>
>
> In instances where it is passed a UINamingContainer or UIForm, it iterates
> over the children, and ultimately returns the last child it finds
> (recursively calling itself for each child). What I don’t understand is why
> it needs to do this. I’m also unsure as to what a UINamingContainer is, I’ve
> read the JavaDocs, but didn’t find them very enlightening – although that
> could just be me!
>
>
>
> Thanks
>
>
>
> James.
>
>
>
>
> SciSys UK Limited. Registered in England and Wales No. 4373530.
> Registered Office: Methuen Park, Chippenham, Wiltshire SN14 0GB, UK.
>
> Before printing, please think about the environment.