Pergunta

I have a ListGrid with filter editor set to visible. Normally if I type data in filter editor it leads to fetching data from server and my executeFetch(..) method is being called.

But in some cases this method isn't called after editing filter's data. For example, if I type "word" it shows me some data in ListGrid. Then I move cursor to the very first position, type "one" so all in all I have filter string "one word". And in this case fetching is not performed, and more over "old" data is shown no more. Maybe I need to disable some caching of resultSet/Criteria?

Here is my ListGrid declaration:

ListGrid grid = new ListGrid();
grid.setCanEdit(false);
grid.setShowFilterEditor(true);
grid.setDataSource(getSource());
grid.setDataPageSize(DATA_PAGE_SIZE);
grid.setFields(gridFields);
Foi útil?

Solução

Don't you find it illogical to refetch on a more restrained criteria? I will explain:

SmartGWT uses data caching to optimize client-server connections and reduce network traffic. In your example, let's say you have the following in your database:

  • one word
  • two words
  • one sentence

When you type word, the fetch returns:

  • one word
  • two words

these values are cached in your client.

When you add one to word, because this ss a more restraining search criteria, no need to server fetch, only client filter and the result is:

  • one word
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top