In MDL Tabbar component and subcomponents has a className when used for
layout and another when used in Tabs.
So I want only one component that set a className if their parent is "Tabs"
component or other if is other component.
In createElement is where we use to set typeNames and className, but maybe
we could set at another time.

2016-11-30 6:07 GMT+01:00 Alex Harui <aha...@adobe.com>:

> Parent should be unavailable at createElement time.  There is no guarantee
> when a component will be added to the DOM.  It could be instantiated and
> have its properties set before being given a parent.
>
> Why do you need to know so early?  And what code would set the parent so
> early?
>
> -Alex
>
> On 11/29/16, 1:02 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> <carlos.rov...@gmail.com on behalf of carlosrov...@apache.org> wrote:
>
> >In UIHTMLElementWrapper:
> >
> >public function get parent():IParent
> >        {
> >            COMPILE::JS
> >            {
> >            var p:WrappedHTMLElement = this.positioner.parentNode as
> >WrappedHTMLElement;
> >            }
> >
> >
> >this.positioner is undefined, so I think that's a bug right?
> >
> >
> >2016-11-29 20:37 GMT+01:00 Carlos Rovira <carlosrov...@apache.org>:
> >
> >> Hi,
> >>
> >> I'm trying to see what component is the parent of the current component
> >>in
> >> createElement mehtod of a ContainerBase
> >>
> >> What's the wat to check this?
> >>
> >> I'm trying something like
> >>
> >> if (parent is SomeComponent) {
> >>   ....
> >> }
> >>
> >> but I'm getting browser error. Can't find examples in source code or in
> >> examples
> >>
> >>
> >> Thanks
> >>
> >>
> >> --
> >> Carlos Rovira
> >> http://about.me/carlosrovira
> >>
> >>
> >
> >
> >--
> >Carlos Rovira
> >http://about.me/carlosrovira
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.

Reply via email to