Isomorphic SmartClient/SmartGWT Framework (v9.1p_2014-03-31/PowerEdition Deployment 2014-03-31)
I'm moving some code from 4.0 to 4.1 and I found an issue where the code is getting null pointer exceptions. These are happening because of calls to either ListGrid.getField or ListGrid.setFieldTitle immediately after calling setDataSource.
Here is an example of some code:
This worked in 4.0, but now gets a null returned from getField. With 4.1, does the datasource field creation happen later than it did before? At what point are the fields created so that I know it is safe to retrieve them?
I'm moving some code from 4.0 to 4.1 and I found an issue where the code is getting null pointer exceptions. These are happening because of calls to either ListGrid.getField or ListGrid.setFieldTitle immediately after calling setDataSource.
Here is an example of some code:
Code:
this.myListGrid.setDataSource( DataSource.get("mydatasource") ); final Map< String, String > icons= new HashMap< String, String >(); icons.put( "1", "../images/check-icon.png" ); final ListGridField fieldEnabled= this.myListGrid.getField( "enabledField" ); fieldEnabled.setValueIcons(icons); fieldEnabled.setShowValueIconOnly(true);
Comment