flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Zarzycki (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-35310) Issue with same Id assigned to components in different views
Date Sat, 20 May 2017 09:03:04 GMT
Piotr Zarzycki created FLEX-35310:

             Summary: Issue with same Id assigned to components in different views
                 Key: FLEX-35310
                 URL: https://issues.apache.org/jira/browse/FLEX-35310
             Project: Apache Flex
          Issue Type: Bug
    Affects Versions: Apache FlexJS 0.8.0
            Reporter: Piotr Zarzycki
         Attachments: DoubleIdIssue.zip, DoubleMDLIdIssue.zip, two_spans_with_same_id.png


Components in old Flex SDK could have same "Id" in different. Unfortunately in FlexJS assigning
same "Id" for components laying out in different views cause major problems with behavior
of those components in HTML.

I've created two small examples (both contains already built application - you can run it
from target/javascript/bin/js-debug/index.html):
1) Built with pure Basic components

- FirstView and SecondView file has following code:
<?xml version="1.0"?>
<js:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
   <js:Label id="lblView" text="My Label First View"/>

- View usage:
<js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        <js:VerticalLayout />
    <views:FirstView width="100" height="50"/>
    <views:SecondView width="100" height="50"/>

*Results:* Attached image: "two_spans_with_same_id.png"

2) Built with MDL only components. 

 - View1 and View2 file has following code:
<?xml version="1.0"?>
<mdl:Grid xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:js="library://ns.apache.org/flexjs/basic" xmlns:models="models.*"
        <models:MenuModel id="menuModel"/>
        <mdl:Button id="menu_btn2" text="Menu Button 2" width="100"/>

        <mdl:Menu dataMdlFor="menu_btn2" ripple="true" bottom="true" left="false"
                  labelField="label" className="customMenuItemRenderer">
                        destinationPropertyName="dataProvider" />

- View usage:
<?xml version="1.0"?>
<mdl:NavigationLayout xmlns:fx="http://ns.adobe.com/mxml/2009"
        <views:View1 height="100" width="200"/>
        <views:View2 height="100" width="200"/>

View1 and View2 contains "Menu" which is associated to some button. In this case second menu
is not working at all. - Once I change "Id" for one of the menu in - both started to work.
- But this is definitely not a solution.

*Expected results:* 
FlexJS should allow for declaring same "Id" value in different view. 

This message was sent by Atlassian JIRA

View raw message