Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34345

Spark DataGrid throws a Null Pointer Exception when data provider's item is being changed by item renderer

    XMLWordPrintableJSON

Details

    Description

      Exception in GridViewLayout.as:1053 occurs when data item is being changed by item renderer. The code:

              for each (var renderer:IGridItemRenderer in visibleItemRenderers)            
              {
                  var rowIndex:int = renderer.rowIndex; 
                  ...
      

      is not null safe, because visibleItemRenderers vector can contain null items under some indices, made f.e. by code in GridViewLayout.as:1753 :

              const renderer:IGridItemRenderer = visibleItemRenderers[index];
              visibleItemRenderers[index] = null;
      

      To reproduce this, create DataGrid with data provider, that contain items with Date fields, and create an ItemRenderer for that column with DateField component, that can change the date in source data item. Error will be throwed when data item's field will be changed and PropertyChangeEvent will be dispatched.

      Attachments

        Activity

          People

            Unassigned Unassigned
            koldoon Vadim Usoltsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: