I use GWT 2.3.I, which I use the GWT cellular network table. Below is the code of the table of my cells:
public class FormGrid extends SuperGrid { List<Form> formList; @Override public void setColumns(CellTable table) { TextColumn<Form> nameColumn = new TextColumn<Form>() { @Override public String getValue(Form object) { return object.getName(); } }; table.addColumn(nameColumn, "Name"); } @Override public void setData() { if (formList != null && formList.size() > 0) { AsyncDataProvider<Form> provider = new AsyncDataProvider<Form>() { @Override protected void onRangeChanged(HasData<Form> display) { int start = display.getVisibleRange().getStart(); int end = start + display.getVisibleRange().getLength(); end = end >= formList.size() ? formList.size() : end; List<Form> sub = formList.subList(start, end); updateRowData(start, sub); } }; provider.addDataDisplay(getTable()); provider.updateRowCount(formList.size(), true); } } public List<Form> getFormList() { return formList; } public void setFormList(List<Form> formList) { this.formList = formList; }
}
In this column of my set and given data, the super superclass stream super will be called. This cell table is working fine. Now I want to put an object of type filter (e.g. search) in this cell table. It should be similar: there is a textbox above the cell table and what has ever been written in this text field should launch a similar query to the entire form name for this text field value.
for example, I have 1000 shapes in a grid. Now, if the user writes the “application” in some filter text field above the table of cells, the entire form that has the “application” there will be filtered out, and the grid will have only those forms
This is the first case:
Another case is that I only process one column in the grid name. I have two more properties in the form (description, tag). But I'm not drawing them. Now for the filter, if the user writes the "application" in the filter field, then he should make a request to all three (name, description and tag) and should return if the "application" matches any of the three.
I do not get how to apply a filter in a cell table. Please help me. Thanks in advance.
gwt gxt smartgwt
Sanjay jain
source share