nihavend opened a new issue #819:
URL: https://github.com/apache/royale-asjs/issues/819


   There are two bugs in here.
   1. data is not passed to inner component
   2. button tooltip is not displayed
   
   Here is the source code for test case : 
   
   > FindBug.mxm
   
   ```
   <?xml version="1.0" encoding="latin5" ?>
   
   <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
                           xmlns:s="library://ns.apache.org/royale/spark"
                           xmlns:mx="library://ns.apache.org/royale/mx"
                           height="100" width="200"
                           currentState="anaSayfaState"
                           xmlns:mtest="main.mtest.*" 
                           
creationComplete="group1_creationCompleteHandler(event)">
   
        
        <fx:Script>
                <![CDATA[
                        import 
mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
                        import mx.collections.ArrayCollection;
                        import mx.events.FlexEvent;
                        import mx.collections.XMLListCollection;
                        import 
mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
   
                        
                        [Bindable]
                        public var jobListXmlCollection:XMLListCollection = new 
XMLListCollection();
                        
                        public var jobListXml:XML = 
                                <jobList netTreeEnablable="false" 
netTreeDisablable="false" >
                                  <genericJob  Id="1" groupId="iot-insights">
                                        <baseJobInfos>
                                                
<jsName>SENSORDATA_HOURLY</jsName>
                                        </baseJobInfos>
                                  </genericJob>
                                </jobList>;
                        
                        protected function 
group1_creationCompleteHandler(event:FlexEvent):void {
                                jobListXmlCollection.source = 
jobListXml.children();
                        }
   
                        public function getJsName(item:XML, 
column:AdvancedDataGridColumn):String {
                                return item.baseJobInfos.jsName;
                        }
   
                ]]>
        </fx:Script>
        
        <mx:Panel title="AdvancedDataGrid Control Example"
                          paddingBottom="10" paddingTop="10" paddingLeft="10" 
paddingRight="10"
                          height="200" width="350">
                
                <mx:AdvancedDataGrid id="pinaraJobList" width="100%" 
height="100%" dataProvider="{jobListXmlCollection}">        
     
                        <mx:columns>
                                
                                <mx:AdvancedDataGridColumn 
labelFunction="getJsName" headerText="Job Name" width="150"/>
                                
                                <mx:AdvancedDataGridColumn headerText="Manage" 
width="150">
                                        <mx:itemRenderer>
                                                <fx:Component>
                                                        <mtest:adg_custom 
selectedGroupId="1" /> <!--RO: {outerDocument.selectedGroupId} -->
                                                </fx:Component>
                                        </mx:itemRenderer>
                                </mx:AdvancedDataGridColumn>
                        
                        </mx:columns>
                        
                </mx:AdvancedDataGrid>
                
        </mx:Panel>
        
   </s:Application>
   
   ```
   
   > adg_custom.mxml
   
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <s:MXAdvancedDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"; 
                                        
xmlns:s="library://ns.apache.org/royale/spark" 
                                        clipAndEnableScrolling="true"
                                        
xmlns:mx="library://ns.apache.org/royale/mx" 
                                        >
        <fx:Declarations>
                <!-- Place non-visual elements (e.g., services, value objects) 
here -->
        </fx:Declarations>
        
        <fx:Script>
                <![CDATA[
                        
                        
                        [Bindable]
                        public var selectedGroupId:String;
                        
                        protected function getLabel():String {
                                return data.baseJobInfos.jsName;
                        }
                        
                ]]>
        </fx:Script>
        
                
        <s:layout>
                <s:HorizontalLayout />
        </s:layout>
        
        <mx:Button label="{getLabel()}" toolTip="{getLabel()}"/>
        
        <s:Button label="{getLabel()}" toolTip="{getLabel()}"/>
        
        
   </s:MXAdvancedDataGridItemRenderer>
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to