royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: Chrome complains about text input with same id
Date Sat, 27 Oct 2018 15:18:51 GMT
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 (<carlosrovira@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 (<carlosrovira@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 (<aharui@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" <carlosrovira@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&amp;data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&amp;sdata=cZBkzNZJ%2Be8l%2FRqYqirImWuoHyOS9yJFZIxjpSzzUA8%3D&amp;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&amp;data=02%7C01%7Caharui%40adobe.com%7C36a5c7d366b943d0c03508d63b79da97%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636761791879697771&amp;sdata=4TEwcme3cASo5dXXFKZkqWvtg11nJ0nQzqaj9yT5hEQ%3D&amp;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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message