PDA

View Full Version : Clearing the combobox lastQuery



chriswesdorp
5 May 2009, 11:15 PM
Hello,

I am looking for a correct way to force the combobox to reload it's content. Imaging a combobox present on a form displaying a (limited) number of items. The trigger action is set to retrieve all items from the server.

However, when I do click on the trigger field all items are loaded and the lastQuery property is set to "". Now I modify the items (add or remove one) with another function on that form and I need to update the combobox items. How can i force to do this, the doQuery(String, boolean) methods aborts if the lastQuery has not been changed.

Chris

chriswesdorp
10 May 2009, 11:37 PM
I almost consider this to be a bug, but maybe there is a good workaround for this. Can the GXT team provide a solution to force the doQuery(String, boolean) to reload the contents even when the lastQuery property has not been changed.

Help would be appreciated.

Chris

skahl
19 Nov 2009, 9:45 PM
I am using 2.0.1 and also seek a solution to this.

Unfortunately lastQuery is private so cannot manipulate it directly. The work around i am using is performing a very unlikley query (.doQuery("78234hjasdfhacv78seghfa89734ufwe9", true)) at the time its values are known to change - but I don't like that much.

Arno.Nyhm
20 Nov 2009, 2:32 AM
you have an full working code sample so someone can fast start with copy and paste to digg in your special problem?

sven
20 Nov 2009, 3:51 AM
We changed lastQuery to be protected. You can clear it so easily in a subclass. For now you will need to use JSNI to access private stuff.