Hi Piotr,

I'm not using Jewel Table. That component needs to be fixed since it uses
seltedItemProperty and it should changed to standard selectedItem.
In TDJ you can see selectedIndex don't work as expected. If you have time
and want to make that change feel free to do so, I don't know when I could
go over that component. I plan to add Jewel DataGrid this summer too as I
enter holidays in August.

Thanks


El dom., 30 jun. 2019 a las 19:17, Piotr Zarzycki (<
[email protected]>) escribió:

> Hi Carlos,
>
> Do you have in your application scenario where you are setting for table
> dataProvider = null ? If yes let me know if I didn't break anything.
>
> Thanks,
> Piotr
>
> niedz., 30 cze 2019 o 19:16 <[email protected]> napisał(a):
>
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > piotrz pushed a commit to branch develop
> > in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >
> >
> > The following commit(s) were added to refs/heads/develop by this push:
> >      new 4356ef9  Jewel Table: Fix issue where dataProvider=null throws
> > exception
> > 4356ef9 is described below
> >
> > commit 4356ef9f1d75fce58f683f10929d74209fad73ea
> > Author: Piotr Zarzycki <[email protected]>
> > AuthorDate: Sun Jun 30 19:16:08 2019 +0200
> >
> >     Jewel Table: Fix issue where dataProvider=null throws exception
> >
> >     - In scenario where Jewel Table dataProvider is being set null and we
> > are using one of the bead for updating table
> > (RemoveTableRowForArrayListData) selectedItemProperty is throwing NPE,
> > cause dataProvider itself is already null
> > ---
> >  .../org/apache/royale/jewel/beads/models/TableModel.as    | 15
> > ++++++++++-----
> >  1 file changed, 10 insertions(+), 5 deletions(-)
> >
> > diff --git
> >
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/TableModel.as
> >
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/TableModel.as
> > index c36b429..5b58f3c 100644
> > ---
> >
> a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/TableModel.as
> > +++
> >
> b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/models/TableModel.as
> > @@ -64,15 +64,20 @@ package org.apache.royale.jewel.beads.models
> >              if (value == _selectedItemProperty) return;
> >
> >                         _selectedItemProperty = value;
> > -                       var n:int = dataProvider.length;
> > -                       for (var i:int = 0; i < n; i++)
> > +
> > +                       if (dataProvider)
> >                         {
> > -                               if (dataProvider.getItemAt(i) ==
> > selectedItem && dataProvider.getItemAt(i)[labelField] == value)
> > +                               var n:int = dataProvider.length;
> > +                               for (var i:int = 0; i < n; i++)
> >                                 {
> > -                                       selectedIndex = i;
> > -                                       break;
> > +                                       if(dataProvider.getItemAt(i) ==
> > selectedItem && dataProvider.getItemAt(i)[labelField] == value)
> > +                                       {
> > +                                               selectedIndex = i;
> > +                                               break;
> > +                                       }
> >                                 }
> >                         }
> > +
> >                         dispatchEvent(new
> > Event("selectedItemPropertyChanged"));
> >                 }
> >
> >
> >
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to