The method getDefaultFormattedValue() is not being called for my listgrid.
Here is sample code from a modified showcase example:
The System.out.println("Entering getDefaultFormattedValue"); is never being called.
Using SmartGWT EE 3.0p
Here is sample code from a modified showcase example:
Code:
package zedes2.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.data.DataSourceField; import com.smartgwt.client.data.Record; import com.smartgwt.client.types.FieldType; import com.smartgwt.client.widgets.grid.ListGrid; public class Alternate implements EntryPoint { public void onModuleLoad() { final ListGrid countryGrid = new ListGrid() { @Override public String getDefaultFormattedValue( Record record, int rowNum, int colNum ) { System.out.println("Entering getDefaultFormattedValue"); return super.getDefaultFormattedValue( record, rowNum, colNum ); } }; countryGrid.setWidth(500); countryGrid.setHeight(224); countryGrid.setShowAllRecords(true); countryGrid.setDataSource(CountryDS.getInstance()); countryGrid.setAutoFetchData(true); countryGrid.setCanEdit(true); countryGrid.draw(); } private static class CountryDS extends DataSource { // The DataSource would normally be defined external to any classes that use it. private static CountryDS instance = null; public static CountryDS getInstance() { if (instance == null) { instance = new CountryDS("countryDS_DS"); } return instance; } public CountryDS(String id) { setID(id); setRecordXPath("/List/country"); DataSourceField countryNameField = new DataSourceField("countryName", FieldType.TEXT, "Country"); DataSourceField countryCodeField = new DataSourceField("countryCode", FieldType.TEXT, "Code"); DataSourceField independenceField = new DataSourceField("independence", FieldType.DATE, "Independence"); DataSourceField populationField = new DataSourceField("population", FieldType.INTEGER, "Population"); DataSourceField gdpField = new DataSourceField("gdp", FieldType.FLOAT, "GDP ($B)"); setFields(countryNameField, countryCodeField, independenceField, populationField, gdpField); //EDIT BEGIN setDataURL("ds/country.data.xml"); //EDIT END } } }
Using SmartGWT EE 3.0p
Comment