I have been trying out the new FilterDataHandler, but it doesn't seem to work as I expected. What I expected to happen was that if you type something in the filtereditor and some kind of filter happens (no matter if it is clientside or serverside) an event happens. However it does not seem to trigger with me. Is this a bug or is it supposed to do something else?
I am using SmartClient Version: SC_SNAPSHOT-2010-11-10/PowerEdition Deployment (built 2010-11-10) with GWT 2.0.4 on Firefox 3.6.12
I am using SmartClient Version: SC_SNAPSHOT-2010-11-10/PowerEdition Deployment (built 2010-11-10) with GWT 2.0.4 on Firefox 3.6.12
Code:
package test.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.widgets.events.FilterDataEvent; import com.smartgwt.client.widgets.events.FilterDataHandler; import com.smartgwt.client.widgets.grid.ListGrid; public class FilterDataChanged implements EntryPoint { public void onModuleLoad() { final ListGrid listGrid = new ListGrid(); listGrid.setDataSource(DataSource.get("contents")); listGrid.fetchData(); listGrid.setShowFilterEditor(true); listGrid.setWidth100(); listGrid.addFilterDataHandler(new FilterDataHandler() { @Override public void onFilterData(FilterDataEvent event) { System.err.println("Filter Data is triggered"); } }); listGrid.draw(); } }
Code:
<DataSource ID="contents" serverType="sql" tableName="content"> <fields> <field primaryKey="true" type="sequence" name="cntn_pk" hidden="true" export="false"></field> <field type="datetime" name="cntn_createdOn" canEdit="false" canFilter="true" title="" detail="true" showInGrid="true" export="true"></field> <field type="text" length="45" name="cntn_id" required="true" exportable="true" export="true"></field> <field title="bar" type="text" length="45" name="cntn_barCode" showInGrid="true" canEdit="false" export="true"></field> <field type="integer" name="cntn_fk_location" hidden="false"></field> <field title="quantity" type="float" name="cntn_quantity" export="true"></field> <field title="unit" type="text" length="45" name="cntn_unit" export="true" ></field> </fields> </DataSource>
Comment