You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Carlos Rovira <ca...@apache.org> on 2018/10/26 19:32:49 UTC
Chrome complains about text input with same id
Hi,
I create a component in MXML that has a TextInput. Since this component is
reusable I have it two instances in my App
In chrome I see
[DOM] Found 2 elements with non-unique id #code_ti: (More info:
https://goo.gl/9p2vKq) <input type="text" id="code_ti" maxlength="5">
I think there's no problem with the two components, but since chrome
doesn't like things like this (in fact html spec wants no duplicate ids)
I was trying to see how can I do. Inside my MXML I have an Script block
that references the text input id. In fact the ID is to do that ;)
So I can remove it, but at the same time, I'm generating html that is not
right.
So how can we deal with this? maybe our id, doesn't should be creating
attribute id in the tag? and make the id reference in other form?
Thanks
--
Carlos Rovira
http://about.me/carlosrovira
Re: Chrome complains about text input with same id
Posted by Alex Harui <ah...@adobe.com.INVALID>.
I'm not surprised if there are bugs remaining to be fixed with localId or any part of Royale.
-Alex
On 10/27/18, 8:19 AM, "Carlos Rovira" <ca...@apache.org> wrote:
For example, if I have in an initComplete handler this:
radiobutton.groupName = groupName;
and in mxml
<j:RadioButton localId="radiobutton"/>
I get in browser:
*PersonForm.js:329 Uncaught TypeError: Cannot set property 'groupName' of
undefined*
and If I check the html generated, the there's no "id" or "_id" ( for what
I read in the discussion thread about localId, I think it shuould create
"_id"?)
Don't know if I'm doing something wrong, or maybe something was broken in
the migration to Royale?
El sáb., 27 oct. 2018 a las 16:20, Carlos Rovira (<ca...@apache.org>)
escribió:
> I'm finding this warning in the compiler since I changed
> "habitualDriverForm" and "useOccasionalDriver." mxml declarations from id
> to localId, but binding is properly working, so I think this is a bug in
> the compiler that does not recognize "localId" for bindings.
>
> col: 78 Warning: Data binding will not be able to detect assignments to
> 'useOccasionalDriver'.
>
> <a:PersonForm
> localId="occasionalDriverForm"
> visible="{habitualDriverForm.useOccasionalDriver.selected}"/>
>
> El sáb., 27 oct. 2018 a las 14:00, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
>> Hi Alex,
>>
>> I'm finding that after change JewelExample most of the id to localId, it
>> works ok in debug but not in release mode
>>
>> For example:
>>
>> DateComponentsPlayGround.js:323 Uncaught TypeError: Cannot read property
>> 'model' of undefined
>>
>> due to
>>
>> <j:DateChooser localId="dateChooserES" change="dateChooserESChanged()"
>> initComplete="configDateChooserToES()"/>
>>
>> and in script block
>>
>> dateChooserES.model.dayNames = ['D','L','M','X','J','V','S'];
>>
>> but this works on debug
>>
>> so my question is, is localId tested on release mode?
>>
>> thanks
>>
>>
>>
>>
>> El sáb., 27 oct. 2018 a las 11:16, Carlos Rovira (<
>> carlosrovira@apache.org>) escribió:
>>
>>> One thing I'm finding is that I'm using an interface in Jewel
>>> (IActivable) that extend IId interface, maybe this interface should change
>>> from "id" to "localId" to enforce the later and avoid people using the
>>> former?
>>> I'll be changing locally to be able to work for now to see thoughts on
>>> this before uploading some change
>>>
>>> thanks
>>>
>>> El sáb., 27 oct. 2018 a las 11:02, Carlos Rovira (<
>>> carlosrovira@apache.org>) escribió:
>>>
>>>> Thanks Alex,
>>>>
>>>> I remember that discussion, but seems at that time I couldn't follow to
>>>> the end.
>>>>
>>>> So, I've changed all my codebase to localId, but seems I still need to
>>>> adjust Jewel code from "id" to "localId".
>>>>
>>>> So to resume, to mimic the use we had in Flex with id, we should use
>>>> always localId, and avoid id, even in framework code right?
>>>>
>>>> thanks
>>>>
>>>>
>>>> El vie., 26 oct. 2018 a las 21:50, Alex Harui (<ah...@adobe.com.invalid>)
>>>> escribió:
>>>>
>>>>> Use localid instead of Id.
>>>>>
>>>>> See https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FFLEX-35310&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=ARjcQqlerwWjdSk4VWyNctoP14wfSAWL2J1P3P6Rydg%3D&reserved=0
>>>>>
>>>>> -Alex
>>>>>
>>>>> On 10/26/18, 12:33 PM, "Carlos Rovira" <ca...@apache.org>
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I create a component in MXML that has a TextInput. Since this
>>>>> component is
>>>>> reusable I have it two instances in my App
>>>>> In chrome I see
>>>>>
>>>>> [DOM] Found 2 elements with non-unique id #code_ti: (More info:
>>>>>
>>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F9p2vKq&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=MkKhMnO%2Fo0kgchW%2FOKJS0F3hPrW6BIQjVZoBo9SWX1c%3D&reserved=0)
>>>>> <input type="text" id="code_ti" maxlength="5">
>>>>>
>>>>> I think there's no problem with the two components, but since
>>>>> chrome
>>>>> doesn't like things like this (in fact html spec wants no
>>>>> duplicate ids)
>>>>>
>>>>> I was trying to see how can I do. Inside my MXML I have an Script
>>>>> block
>>>>> that references the text input id. In fact the ID is to do that ;)
>>>>> So I can remove it, but at the same time, I'm generating html that
>>>>> is not
>>>>> right.
>>>>>
>>>>> So how can we deal with this? maybe our id, doesn't should be
>>>>> creating
>>>>> attribute id in the tag? and make the id reference in other form?
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
>>>>> Carlos Rovira
>>>>>
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=emSeEDDvtGXKWGbr7ExeRXqU5PEeKUknmahDar1dFsA%3D&reserved=0
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Carlos Rovira
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=emSeEDDvtGXKWGbr7ExeRXqU5PEeKUknmahDar1dFsA%3D&reserved=0
>>>>
>>>>
>>>
>>> --
>>> Carlos Rovira
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=emSeEDDvtGXKWGbr7ExeRXqU5PEeKUknmahDar1dFsA%3D&reserved=0
>>>
>>>
>>
>> --
>> Carlos Rovira
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=emSeEDDvtGXKWGbr7ExeRXqU5PEeKUknmahDar1dFsA%3D&reserved=0
>>
>>
>
> --
> Carlos Rovira
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=emSeEDDvtGXKWGbr7ExeRXqU5PEeKUknmahDar1dFsA%3D&reserved=0
>
>
--
Carlos Rovira
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C8ee0a8f7ee634111f0ce08d63c1f8af5%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636762503512027997&sdata=emSeEDDvtGXKWGbr7ExeRXqU5PEeKUknmahDar1dFsA%3D&reserved=0
Re: Chrome complains about text input with same id
Posted by Carlos Rovira <ca...@apache.org>.
For example, if I have in an initComplete handler this:
radiobutton.groupName = groupName;
and in mxml
<j:RadioButton localId="radiobutton"/>
I get in browser:
*PersonForm.js:329 Uncaught TypeError: Cannot set property 'groupName' of
undefined*
and If I check the html generated, the there's no "id" or "_id" ( for what
I read in the discussion thread about localId, I think it shuould create
"_id"?)
Don't know if I'm doing something wrong, or maybe something was broken in
the migration to Royale?
El sáb., 27 oct. 2018 a las 16:20, Carlos Rovira (<ca...@apache.org>)
escribió:
> I'm finding this warning in the compiler since I changed
> "habitualDriverForm" and "useOccasionalDriver." mxml declarations from id
> to localId, but binding is properly working, so I think this is a bug in
> the compiler that does not recognize "localId" for bindings.
>
> col: 78 Warning: Data binding will not be able to detect assignments to
> 'useOccasionalDriver'.
>
> <a:PersonForm
> localId="occasionalDriverForm"
> visible="{habitualDriverForm.useOccasionalDriver.selected}"/>
>
> El sáb., 27 oct. 2018 a las 14:00, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
>> Hi Alex,
>>
>> I'm finding that after change JewelExample most of the id to localId, it
>> works ok in debug but not in release mode
>>
>> For example:
>>
>> DateComponentsPlayGround.js:323 Uncaught TypeError: Cannot read property
>> 'model' of undefined
>>
>> due to
>>
>> <j:DateChooser localId="dateChooserES" change="dateChooserESChanged()"
>> initComplete="configDateChooserToES()"/>
>>
>> and in script block
>>
>> dateChooserES.model.dayNames = ['D','L','M','X','J','V','S'];
>>
>> but this works on debug
>>
>> so my question is, is localId tested on release mode?
>>
>> thanks
>>
>>
>>
>>
>> El sáb., 27 oct. 2018 a las 11:16, Carlos Rovira (<
>> carlosrovira@apache.org>) escribió:
>>
>>> One thing I'm finding is that I'm using an interface in Jewel
>>> (IActivable) that extend IId interface, maybe this interface should change
>>> from "id" to "localId" to enforce the later and avoid people using the
>>> former?
>>> I'll be changing locally to be able to work for now to see thoughts on
>>> this before uploading some change
>>>
>>> thanks
>>>
>>> El sáb., 27 oct. 2018 a las 11:02, Carlos Rovira (<
>>> carlosrovira@apache.org>) escribió:
>>>
>>>> Thanks Alex,
>>>>
>>>> I remember that discussion, but seems at that time I couldn't follow to
>>>> the end.
>>>>
>>>> So, I've changed all my codebase to localId, but seems I still need to
>>>> adjust Jewel code from "id" to "localId".
>>>>
>>>> So to resume, to mimic the use we had in Flex with id, we should use
>>>> always localId, and avoid id, even in framework code right?
>>>>
>>>> thanks
>>>>
>>>>
>>>> El vie., 26 oct. 2018 a las 21:50, Alex Harui (<ah...@adobe.com.invalid>)
>>>> escribió:
>>>>
>>>>> Use localid instead of Id.
>>>>>
>>>>> See https://issues.apache.org/jira/browse/FLEX-35310
>>>>>
>>>>> -Alex
>>>>>
>>>>> On 10/26/18, 12:33 PM, "Carlos Rovira" <ca...@apache.org>
>>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I create a component in MXML that has a TextInput. Since this
>>>>> component is
>>>>> reusable I have it two instances in my App
>>>>> In chrome I see
>>>>>
>>>>> [DOM] Found 2 elements with non-unique id #code_ti: (More info:
>>>>>
>>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F9p2vKq&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=cZBkzNZJ%2Be8l%2FRqYqirImWuoHyOS9yJFZIxjpSzzUA8%3D&reserved=0)
>>>>> <input type="text" id="code_ti" maxlength="5">
>>>>>
>>>>> I think there's no problem with the two components, but since
>>>>> chrome
>>>>> doesn't like things like this (in fact html spec wants no
>>>>> duplicate ids)
>>>>>
>>>>> I was trying to see how can I do. Inside my MXML I have an Script
>>>>> block
>>>>> that references the text input id. In fact the ID is to do that ;)
>>>>> So I can remove it, but at the same time, I'm generating html that
>>>>> is not
>>>>> right.
>>>>>
>>>>> So how can we deal with this? maybe our id, doesn't should be
>>>>> creating
>>>>> attribute id in the tag? and make the id reference in other form?
>>>>>
>>>>> Thanks
>>>>>
>>>>> --
>>>>> Carlos Rovira
>>>>>
>>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=4TEwcme3cASo5dXXFKZkqWvtg11nJ0nQzqaj9yT5hEQ%3D&reserved=0
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Carlos Rovira
>>>> http://about.me/carlosrovira
>>>>
>>>>
>>>
>>> --
>>> Carlos Rovira
>>> http://about.me/carlosrovira
>>>
>>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Chrome complains about text input with same id
Posted by Carlos Rovira <ca...@apache.org>.
I'm finding this warning in the compiler since I changed
"habitualDriverForm" and "useOccasionalDriver." mxml declarations from id
to localId, but binding is properly working, so I think this is a bug in
the compiler that does not recognize "localId" for bindings.
col: 78 Warning: Data binding will not be able to detect assignments to
'useOccasionalDriver'.
<a:PersonForm
localId="occasionalDriverForm"
visible="{habitualDriverForm.useOccasionalDriver.selected}"/>
El sáb., 27 oct. 2018 a las 14:00, Carlos Rovira (<ca...@apache.org>)
escribió:
> Hi Alex,
>
> I'm finding that after change JewelExample most of the id to localId, it
> works ok in debug but not in release mode
>
> For example:
>
> DateComponentsPlayGround.js:323 Uncaught TypeError: Cannot read property
> 'model' of undefined
>
> due to
>
> <j:DateChooser localId="dateChooserES" change="dateChooserESChanged()"
> initComplete="configDateChooserToES()"/>
>
> and in script block
>
> dateChooserES.model.dayNames = ['D','L','M','X','J','V','S'];
>
> but this works on debug
>
> so my question is, is localId tested on release mode?
>
> thanks
>
>
>
>
> El sáb., 27 oct. 2018 a las 11:16, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
>> One thing I'm finding is that I'm using an interface in Jewel
>> (IActivable) that extend IId interface, maybe this interface should change
>> from "id" to "localId" to enforce the later and avoid people using the
>> former?
>> I'll be changing locally to be able to work for now to see thoughts on
>> this before uploading some change
>>
>> thanks
>>
>> El sáb., 27 oct. 2018 a las 11:02, Carlos Rovira (<
>> carlosrovira@apache.org>) escribió:
>>
>>> Thanks Alex,
>>>
>>> I remember that discussion, but seems at that time I couldn't follow to
>>> the end.
>>>
>>> So, I've changed all my codebase to localId, but seems I still need to
>>> adjust Jewel code from "id" to "localId".
>>>
>>> So to resume, to mimic the use we had in Flex with id, we should use
>>> always localId, and avoid id, even in framework code right?
>>>
>>> thanks
>>>
>>>
>>> El vie., 26 oct. 2018 a las 21:50, Alex Harui (<ah...@adobe.com.invalid>)
>>> escribió:
>>>
>>>> Use localid instead of Id.
>>>>
>>>> See https://issues.apache.org/jira/browse/FLEX-35310
>>>>
>>>> -Alex
>>>>
>>>> On 10/26/18, 12:33 PM, "Carlos Rovira" <ca...@apache.org>
>>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I create a component in MXML that has a TextInput. Since this
>>>> component is
>>>> reusable I have it two instances in my App
>>>> In chrome I see
>>>>
>>>> [DOM] Found 2 elements with non-unique id #code_ti: (More info:
>>>>
>>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F9p2vKq&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=cZBkzNZJ%2Be8l%2FRqYqirImWuoHyOS9yJFZIxjpSzzUA8%3D&reserved=0)
>>>> <input type="text" id="code_ti" maxlength="5">
>>>>
>>>> I think there's no problem with the two components, but since chrome
>>>> doesn't like things like this (in fact html spec wants no duplicate
>>>> ids)
>>>>
>>>> I was trying to see how can I do. Inside my MXML I have an Script
>>>> block
>>>> that references the text input id. In fact the ID is to do that ;)
>>>> So I can remove it, but at the same time, I'm generating html that
>>>> is not
>>>> right.
>>>>
>>>> So how can we deal with this? maybe our id, doesn't should be
>>>> creating
>>>> attribute id in the tag? and make the id reference in other form?
>>>>
>>>> Thanks
>>>>
>>>> --
>>>> Carlos Rovira
>>>>
>>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=4TEwcme3cASo5dXXFKZkqWvtg11nJ0nQzqaj9yT5hEQ%3D&reserved=0
>>>>
>>>>
>>>>
>>>
>>> --
>>> Carlos Rovira
>>> http://about.me/carlosrovira
>>>
>>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Chrome complains about text input with same id
Posted by Carlos Rovira <ca...@apache.org>.
Hi Alex,
I'm finding that after change JewelExample most of the id to localId, it
works ok in debug but not in release mode
For example:
DateComponentsPlayGround.js:323 Uncaught TypeError: Cannot read property
'model' of undefined
due to
<j:DateChooser localId="dateChooserES" change="dateChooserESChanged()"
initComplete="configDateChooserToES()"/>
and in script block
dateChooserES.model.dayNames = ['D','L','M','X','J','V','S'];
but this works on debug
so my question is, is localId tested on release mode?
thanks
El sáb., 27 oct. 2018 a las 11:16, Carlos Rovira (<ca...@apache.org>)
escribió:
> One thing I'm finding is that I'm using an interface in Jewel (IActivable)
> that extend IId interface, maybe this interface should change from "id" to
> "localId" to enforce the later and avoid people using the former?
> I'll be changing locally to be able to work for now to see thoughts on
> this before uploading some change
>
> thanks
>
> El sáb., 27 oct. 2018 a las 11:02, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
>> Thanks Alex,
>>
>> I remember that discussion, but seems at that time I couldn't follow to
>> the end.
>>
>> So, I've changed all my codebase to localId, but seems I still need to
>> adjust Jewel code from "id" to "localId".
>>
>> So to resume, to mimic the use we had in Flex with id, we should use
>> always localId, and avoid id, even in framework code right?
>>
>> thanks
>>
>>
>> El vie., 26 oct. 2018 a las 21:50, Alex Harui (<ah...@adobe.com.invalid>)
>> escribió:
>>
>>> Use localid instead of Id.
>>>
>>> See https://issues.apache.org/jira/browse/FLEX-35310
>>>
>>> -Alex
>>>
>>> On 10/26/18, 12:33 PM, "Carlos Rovira" <ca...@apache.org> wrote:
>>>
>>> Hi,
>>>
>>> I create a component in MXML that has a TextInput. Since this
>>> component is
>>> reusable I have it two instances in my App
>>> In chrome I see
>>>
>>> [DOM] Found 2 elements with non-unique id #code_ti: (More info:
>>>
>>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F9p2vKq&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=cZBkzNZJ%2Be8l%2FRqYqirImWuoHyOS9yJFZIxjpSzzUA8%3D&reserved=0)
>>> <input type="text" id="code_ti" maxlength="5">
>>>
>>> I think there's no problem with the two components, but since chrome
>>> doesn't like things like this (in fact html spec wants no duplicate
>>> ids)
>>>
>>> I was trying to see how can I do. Inside my MXML I have an Script
>>> block
>>> that references the text input id. In fact the ID is to do that ;)
>>> So I can remove it, but at the same time, I'm generating html that
>>> is not
>>> right.
>>>
>>> So how can we deal with this? maybe our id, doesn't should be
>>> creating
>>> attribute id in the tag? and make the id reference in other form?
>>>
>>> Thanks
>>>
>>> --
>>> Carlos Rovira
>>>
>>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=4TEwcme3cASo5dXXFKZkqWvtg11nJ0nQzqaj9yT5hEQ%3D&reserved=0
>>>
>>>
>>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Chrome complains about text input with same id
Posted by Carlos Rovira <ca...@apache.org>.
One thing I'm finding is that I'm using an interface in Jewel (IActivable)
that extend IId interface, maybe this interface should change from "id" to
"localId" to enforce the later and avoid people using the former?
I'll be changing locally to be able to work for now to see thoughts on this
before uploading some change
thanks
El sáb., 27 oct. 2018 a las 11:02, Carlos Rovira (<ca...@apache.org>)
escribió:
> Thanks Alex,
>
> I remember that discussion, but seems at that time I couldn't follow to
> the end.
>
> So, I've changed all my codebase to localId, but seems I still need to
> adjust Jewel code from "id" to "localId".
>
> So to resume, to mimic the use we had in Flex with id, we should use
> always localId, and avoid id, even in framework code right?
>
> thanks
>
>
> El vie., 26 oct. 2018 a las 21:50, Alex Harui (<ah...@adobe.com.invalid>)
> escribió:
>
>> Use localid instead of Id.
>>
>> See https://issues.apache.org/jira/browse/FLEX-35310
>>
>> -Alex
>>
>> On 10/26/18, 12:33 PM, "Carlos Rovira" <ca...@apache.org> wrote:
>>
>> Hi,
>>
>> I create a component in MXML that has a TextInput. Since this
>> component is
>> reusable I have it two instances in my App
>> In chrome I see
>>
>> [DOM] Found 2 elements with non-unique id #code_ti: (More info:
>>
>> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F9p2vKq&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=cZBkzNZJ%2Be8l%2FRqYqirImWuoHyOS9yJFZIxjpSzzUA8%3D&reserved=0)
>> <input type="text" id="code_ti" maxlength="5">
>>
>> I think there's no problem with the two components, but since chrome
>> doesn't like things like this (in fact html spec wants no duplicate
>> ids)
>>
>> I was trying to see how can I do. Inside my MXML I have an Script
>> block
>> that references the text input id. In fact the ID is to do that ;)
>> So I can remove it, but at the same time, I'm generating html that is
>> not
>> right.
>>
>> So how can we deal with this? maybe our id, doesn't should be creating
>> attribute id in the tag? and make the id reference in other form?
>>
>> Thanks
>>
>> --
>> Carlos Rovira
>>
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=4TEwcme3cASo5dXXFKZkqWvtg11nJ0nQzqaj9yT5hEQ%3D&reserved=0
>>
>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Chrome complains about text input with same id
Posted by Carlos Rovira <ca...@apache.org>.
Thanks Alex,
I remember that discussion, but seems at that time I couldn't follow to the
end.
So, I've changed all my codebase to localId, but seems I still need to
adjust Jewel code from "id" to "localId".
So to resume, to mimic the use we had in Flex with id, we should use always
localId, and avoid id, even in framework code right?
thanks
El vie., 26 oct. 2018 a las 21:50, Alex Harui (<ah...@adobe.com.invalid>)
escribió:
> Use localid instead of Id.
>
> See https://issues.apache.org/jira/browse/FLEX-35310
>
> -Alex
>
> On 10/26/18, 12:33 PM, "Carlos Rovira" <ca...@apache.org> wrote:
>
> Hi,
>
> I create a component in MXML that has a TextInput. Since this
> component is
> reusable I have it two instances in my App
> In chrome I see
>
> [DOM] Found 2 elements with non-unique id #code_ti: (More info:
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F9p2vKq&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=cZBkzNZJ%2Be8l%2FRqYqirImWuoHyOS9yJFZIxjpSzzUA8%3D&reserved=0)
> <input type="text" id="code_ti" maxlength="5">
>
> I think there's no problem with the two components, but since chrome
> doesn't like things like this (in fact html spec wants no duplicate
> ids)
>
> I was trying to see how can I do. Inside my MXML I have an Script block
> that references the text input id. In fact the ID is to do that ;)
> So I can remove it, but at the same time, I'm generating html that is
> not
> right.
>
> So how can we deal with this? maybe our id, doesn't should be creating
> attribute id in the tag? and make the id reference in other form?
>
> Thanks
>
> --
> Carlos Rovira
>
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=4TEwcme3cASo5dXXFKZkqWvtg11nJ0nQzqaj9yT5hEQ%3D&reserved=0
>
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Chrome complains about text input with same id
Posted by Alex Harui <ah...@adobe.com.INVALID>.
Use localid instead of Id.
See https://issues.apache.org/jira/browse/FLEX-35310
-Alex
On 10/26/18, 12:33 PM, "Carlos Rovira" <ca...@apache.org> wrote:
Hi,
I create a component in MXML that has a TextInput. Since this component is
reusable I have it two instances in my App
In chrome I see
[DOM] Found 2 elements with non-unique id #code_ti: (More info:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgoo.gl%2F9p2vKq&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=cZBkzNZJ%2Be8l%2FRqYqirImWuoHyOS9yJFZIxjpSzzUA8%3D&reserved=0) <input type="text" id="code_ti" maxlength="5">
I think there's no problem with the two components, but since chrome
doesn't like things like this (in fact html spec wants no duplicate ids)
I was trying to see how can I do. Inside my MXML I have an Script block
that references the text input id. In fact the ID is to do that ;)
So I can remove it, but at the same time, I'm generating html that is not
right.
So how can we deal with this? maybe our id, doesn't should be creating
attribute id in the tag? and make the id reference in other form?
Thanks
--
Carlos Rovira
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&sdata=4TEwcme3cASo5dXXFKZkqWvtg11nJ0nQzqaj9yT5hEQ%3D&reserved=0