royale-asjs icon indicating copy to clipboard operation
royale-asjs copied to clipboard

Data binding does not work for direct class

Open SolidSoft-Lda opened this issue 2 years ago • 1 comments

  1. ContainerDataBinding mxml

<dg:DataGrid localId="grid" dataProvider="{data}"> dg:beads <beads:DataGridOptions modelType="{TestGridModel}"/> </dg:beads>

  1. The DataGridOptions bead it's a bead to dynamically add buttons to the Jewel DataGrid

  2. Result: Data binding is not working.

Workaround (tested):

public class TestConfig { public static const gridModel:Class = TestGridModel; }

<beads:DataGridOptions modelType="{TestConfig.gridModel}"/>

  1. Result: Data binding works.

SolidSoft-Lda avatar Mar 29 '22 00:03 SolidSoft-Lda

I accidentally discover that adding a local id value the issue does not happen. Ex: <beads:DataGridOptions localId="options1" modelType="{TestConfig.gridModel}"/>

This also happens with other components as Jewel DataGrid. The dataProvider binding only works when I set a localId to the DataGrid.

SolidSoft-Lda avatar Apr 02 '22 09:04 SolidSoft-Lda