difference between id and localId

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

difference between id and localId

choirul anam
All,
What is the difference between id and localId in royale?
When and where we use?

Thanks,
Choirul




--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: difference between id and localId

Alex Harui-2
The "id" property also ends up as the HTMLElement's id in the DOM for CSS ID selectors.  Which works great until you have multiple instances of some MXML.  You may get errors from the browser for having more than one HTMLElement with the same id.

So, if you are creating MXML components that will have multiple instances and don't need CSS ID selectors, use localId.

HTH,
-Alex

On 4/29/19, 6:31 PM, "choirul anam" <[hidden email]> wrote:

    All,
    What is the difference between id and localId in royale?
    When and where we use?
   
    Thanks,
    Choirul
   
   
   
   
    --
    Sent from: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-users.20374.n8.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Ca71a6bcfcd8044f1eba808d6cd0b7f99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636921846642595469&amp;sdata=VcXvgJP%2BrKxQO%2FHqQHRappx9CXDkuwkNLUhs%2FJ1xMkE%3D&amp;reserved=0
   

Reply | Threaded
Open this post in threaded view
|

Re: difference between id and localId

Carlos Rovira-2
Hi, 

I make this question a SOF question and respond myself [1]
Please if you can vote response it will help me to start generating reputation to do more things on SOF.


El mar., 30 abr. 2019 a las 4:19, Alex Harui (<[hidden email]>) escribió:
The "id" property also ends up as the HTMLElement's id in the DOM for CSS ID selectors.  Which works great until you have multiple instances of some MXML.  You may get errors from the browser for having more than one HTMLElement with the same id.

So, if you are creating MXML components that will have multiple instances and don't need CSS ID selectors, use localId.

HTH,
-Alex

On 4/29/19, 6:31 PM, "choirul anam" <[hidden email]> wrote:

    All,
    What is the difference between id and localId in royale?
    When and where we use?

    Thanks,
    Choirul




    --
    Sent from: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-users.20374.n8.nabble.com%2F&amp;data=02%7C01%7Caharui%40adobe.com%7Ca71a6bcfcd8044f1eba808d6cd0b7f99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636921846642595469&amp;sdata=VcXvgJP%2BrKxQO%2FHqQHRappx9CXDkuwkNLUhs%2FJ1xMkE%3D&amp;reserved=0




--