When you changed from s:DataGrid to mx:AdvancedDataGrid, you have to change 
s:itemRenderer to mx:itemRenderer.  Those are the “rules” of MXML.

Let us know if there are other issues after you make those changes.

HTH,
-Alex

From: Serkan Taş <serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org" <users@royale.apache.org>
Date: Wednesday, March 4, 2020 at 10:53 PM
To: "users@royale.apache.org" <users@royale.apache.org>
Subject: Re: Grid does not load data

Ok, let me make it clear. When  I enable the simplest one of the commented 
parts here is the output :

[cid:image001.png@01D5F285.547B0C20]

Thanks
Serkan

5.03.2020 06:45 tarihinde Alex Harui yazdı:
Hi Serkan,

What does “not able to make it work” mean?  Compile errors?  Something else?

In the source, it looked like the item renderers were commented out.

-Alex

From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>
Date: Wednesday, March 4, 2020 at 7:30 PM
To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>, Alex Harui 
<aha...@adobe.com><mailto:aha...@adobe.com>
Subject: Re: Grid does not load data

Hi Alex,

I converted my Spark Grid to mx ADG mostly. I tried to replace GridItemRenderer 
with MXAdvancedDataGridItemRendererbut not be able to make it wok.

The commented parts are left needs to be working but not, what you advise ?

        <mx:AdvancedDataGrid id="pinaraJobList" width="100%" height="100%" 
dataProvider="{jobListXmlCollection}">

            <mx:columns>
                <mx:AdvancedDataGridColumn 
headerText="{resourceManager.getString('messages', 'stateGrid')}" 
width="{this.pinaraJobList.width * 0.10}">
                    <!--s:itemRenderer>
                        <fx:Component>
                            <s:GridItemRenderer>
                                <s:layout>
                                    <s:VerticalLayout horizontalAlign="center" 
verticalAlign="middle"/>
                                </s:layout>
                                <jobdetail:StateImageItem id="stateImageItem" 
data="{data}"/>
                            </s:GridItemRenderer>
                        </fx:Component>
                    </s:itemRenderer-->
                </mx:AdvancedDataGridColumn>
                <mx:AdvancedDataGridColumn 
headerText="{resourceManager.getString('messages', 'manageGrid')}" width="150" 
id="mngColumn">
                    <!--s:itemRenderer>
                        <fx:Component>
                            <jobdetail:PinaraJobListGridManageColumn 
selectedGroupId="{outerDocument.selectedGroupId}" />
                        </fx:Component>
                    </s:itemRenderer-->
                </mx:AdvancedDataGridColumn>

                <mx:AdvancedDataGridColumn labelFunction="getId" 
headerText="{resourceManager.getString('messages', 'jobIdGrid')}" 
sortDescending="false" sortCompareFunction="compareIds" 
width="{this.pinaraJobList.width * 0.06}" />
                <mx:AdvancedDataGridColumn labelFunction="getJsName" 
headerText="{resourceManager.getString('messages', 'jobNameGrid')}" 
width="{this.pinaraJobList.width * 0.10}">
                    <!--s:itemRenderer>
                        <fx:Component>
                            <s:DefaultGridItemRenderer textAlign="left" />
                        </fx:Component>
                    </s:itemRenderer-->
                </mx:AdvancedDataGridColumn>
                <mx:AdvancedDataGridColumn labelFunction="getGroupId" 
headerText="{resourceManager.getString('messages', 'jobGrupIdGrid')}" />
                <mx:AdvancedDataGridColumn labelFunction="getJobCommandType" 
sortCompareFunction="compareSortString" 
headerText="{resourceManager.getString('messages', 'jobCommandTypeGrid')}" />
                <mx:AdvancedDataGridColumn labelFunction="getJobTriggerType" 
sortCompareFunction="compareSortString" 
headerText="{resourceManager.getString('messages', 'jobTriggerTypeGrid')}" />
                <mx:AdvancedDataGridColumn labelFunction="getRecordedDT" 
sortCompareFunction="compareSortForDate" 
headerText="{resourceManager.getString('messages', 'jobLastWTGrid')}" />
                <mx:AdvancedDataGridColumn labelFunction="getActualDT" 
sortCompareFunction="compareSortForDate" 
headerText="{resourceManager.getString('messages', 'jobPlannedWTGrid')}" />
                <mx:AdvancedDataGridColumn labelFunction="getRealizedDuration" 
sortCompareFunction="compareSortForDuration" 
headerText="{resourceManager.getString('messages', 'jobRealizedDuration')}" />
                <mx:AdvancedDataGridColumn labelFunction="getLastWorkingStatus" 
sortCompareFunction="compareSortString" 
headerText="{resourceManager.getString('messages', 'jobLastWorkingStatus')}"/>
            </mx:columns>

        </mx:AdvancedDataGrid>


Complete source you can test :  
https://drive.google.com/open?id=1_6-rBQqTISbeoLvS2-yV8bSFkvS_ApxZ<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1_6-rBQqTISbeoLvS2-yV8bSFkvS_ApxZ&data=02%7C01%7Caharui%40adobe.com%7C54524202544d412e0ab608d7c0d1dec9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637189879940933555&sdata=zh6y2D60V9bduMW3KoG7dDuZ0qsTX9JZutokHwW9KMY%3D&reserved=0>

Thanks,
Serkan
2.03.2020 10:39 tarihinde Alex Harui yazdı:
Well, Spark GridItemRenderer is intended for Spark DataGrid.

I just pushed changes to get s:MXAdvancedDataGridItemRenderer to work.  You 
should be able to use that instead of GridItemRenderer.

-Alex

From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Date: Sunday, March 1, 2020 at 2:04 AM
To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>, Alex Harui 
<aha...@adobe.com><mailto:aha...@adobe.com>
Subject: Re: Grid does not load data

Addition :

Itemrenderers are not iöplemented in MX ADG

<s:GridColumn headerText="{resourceManager.getString('messages', 'stateGrid')}" 
width="{this.pinaraJobList.width * 0.10}">
                    <s:itemRenderer>
                        <fx:Component>
                            <s:GridItemRenderer>
                                <s:layout>
                                    <s:VerticalLayout horizontalAlign="center" 
verticalAlign="middle"/>
                                </s:layout>
                                <jobdetail:StateImageItem id="stateImageItem" 
data="{data}"/>
                            </s:GridItemRenderer>
                        </fx:Component>
                    </s:itemRenderer>
                </s:GridColumn>
                <s:GridColumn 
headerText="{resourceManager.getString('messages', 'manageGrid')}" width="150" 
maxWidth="250" id="mngColumn">
                    <s:itemRenderer>
                        <fx:Component>
                            <jobdetail:PinaraJobListGridManageColumn 
selectedGroupId="{outerDocument.selectedGroupId}" />
                        </fx:Component>
                    </s:itemRenderer>
                </s:GridColumn>
                <s:GridColumn dataField="@Id" 
headerText="{resourceManager.getString('messages', 'jobIdGrid')}" 
sortDescending="false" sortCompareFunction="compareIds" 
width="{this.pinaraJobList.width * 0.06}">
                    <s:itemRenderer>
                        <fx:Component>
                            <s:DefaultGridItemRenderer textAlign="left" />
                        </fx:Component->
                    </s:itemRenderer>
                </s:GridColumn>
                <s:GridColumn dataField="baseJobInfos.jsName" 
headerText="{resourceManager.getString('messages', 'jobNameGrid')}" 
width="{this.pinaraJobList.width * 0.10}">
                    <s:itemRenderer>
                        <fx:Component>
                            <s:DefaultGridItemRenderer textAlign="left" />
                        </fx:Component>
                    </s:itemRenderer>
                </s:GridColumn>
1.03.2020 09:55 tarihinde Serkan Taş yazdı:
If you have time may you please check the file  : 
https://drive.google.com/open?id=1_6-rBQqTISbeoLvS2-yV8bSFkvS_ApxZ<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1_6-rBQqTISbeoLvS2-yV8bSFkvS_ApxZ&data=02%7C01%7Caharui%40adobe.com%7C54524202544d412e0ab608d7c0d1dec9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637189879940933555&sdata=zh6y2D60V9bduMW3KoG7dDuZ0qsTX9JZutokHwW9KMY%3D&reserved=0>

Looks like more rework is needed to convert it to MX ADG.

Need your opinion.

Serkan
1.03.2020 02:38 tarihinde Alex Harui yazdı:
Pretty sure Spark DG “selectionChange” is just “change” for MX ADG.

-Alex

From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>
Date: Saturday, February 29, 2020 at 4:25 AM
To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>, Alex Harui 
<aha...@adobe.com><mailto:aha...@adobe.com>
Subject: Re: Grid does not load data

First requirement : selectionChanged

This event handler does not exist for mx:DataGrid.

D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\jobdetail\PinaraJobListGrid.mxml(204):
 col: 61 Error: This attribute is unexpected. It will be ignored.

        <mx:DataGrid id="pinaraJobList" width="100%" height="100%" 
selectionChange="selectionChangeHandlerPinara(event)" 
dataProvider="{jobListXmlCollection}">
29.02.2020 01:28 tarihinde Alex Harui yazdı:
This was working recently:  
https://github.com/apache/royale-asjs/issues/681<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F681&data=02%7C01%7Caharui%40adobe.com%7C54524202544d412e0ab608d7c0d1dec9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637189879940943552&sdata=lfMRWY7mU5OEptZa1L1BM5bXYwETwe1oDQcrrxeL69M%3D&reserved=0>

What did your subclass of Spark DG do?

-Alex

From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Date: Friday, February 28, 2020 at 1:36 PM
To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>, Alex Harui 
<aha...@adobe.com><mailto:aha...@adobe.com>
Subject: Re: Grid does not load data

Alex, if any working example of MX:AdvancedDataGrid may you share ?
29.02.2020 00:16 tarihinde Serkan Taş yazdı:
I have custom class extending the spark advancedatagrid, I am not sure if it 
will satisify the requirements but let me try and let you know.

Thanks,
Serkan
29.02.2020 00:14 tarihinde Alex Harui yazdı:
We have hardly worked on Spark DataGrid at all.  Can you use 
MX:AdvancedDataGrid instead?

From: Serkan Taş 
<serkan....@likyateknoloji.com><mailto:serkan....@likyateknoloji.com>
Reply-To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Date: Friday, February 28, 2020 at 1:08 PM
To: "users@royale.apache.org"<mailto:users@royale.apache.org> 
<users@royale.apache.org><mailto:users@royale.apache.org>
Subject: Grid does not load data

Hi,

Before creating issue I want to get comment why the below code is not working, 
mean grid is not displayed ?


<?xml version="1.0" encoding="latin5" ?>

<s:Application 
xmlns:fx="http://ns.adobe.com/mxml/2009";<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C54524202544d412e0ab608d7c0d1dec9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637189879940943552&sdata=uCHI73diUc6tM%2Fj%2Fe8Ce2J3Gz0mtEQfVAzFaF6tE7A4%3D&reserved=0>
               xmlns:s="library://ns.apache.org/royale/spark"
               xmlns:mx="library://ns.apache.org/royale/mx"
               height="600" width="800">

    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;

        ]]>
    </fx:Script>

    <fx:Declarations>
        <s:ArrayCollection id="employeeArrColl">
            <fx:Object first="Anders" last="Öhlund" age="36"/>
            <fx:Object first="Eileen" last="Oehland" age="25"/>
            <fx:Object first="Anders" last="Zorn" age="36"/>
            <fx:Object first="Steve" last="Aaron" age="40"/>
            <fx:Object first="Toren" last="Ohlin" age="20"/>
            <fx:Object first="Toren" last="Aaron" age="36"/>
            <fx:Object first="Torolf" last="Aaron" age="40"/>
        </s:ArrayCollection>
    </fx:Declarations>

    <s:Panel title="Spark Sort and SortField" width="100%" height="100%">

        <s:DataGrid id="dg" dataProvider="{employeeArrColl}" width="100%">
            <s:columns>
                <s:ArrayList>
                    <s:GridColumn dataField="first" headerText="First Name"/>
                    <s:GridColumn dataField="last" headerText="Last Name"/>
                    <s:GridColumn dataField="age" headerText="Age"/>
                </s:ArrayList>
            </s:columns>
        </s:DataGrid>

    </s:Panel>
</s:Application>




























Reply via email to