PDA

View Full Version : ComboBox - load Store ?



Michi_de
28 Nov 2008, 1:47 AM
Hi,

a comboBox in my application has a Store (box.setStore(store) ).
This store is initialized with a loader ( store = new ListStore<Model>(loader)).
So the data in the store is comin from an rpc call proxy. Its workin just fine.

But when i've a textfield in the left, which adds new data into my database and in the right the combobox with the store (which contain the data out of the database), the data in the store wont be reloaded when i click the "dropdown-arrow".
So i wanted to know: when does the data gets reloaded in my combobox? I've got the feeling, that it sometimes reloads it and sometimes not.
The only place i do .load() on my loader is just once in my initial event. After that it sometimes gets reloaded and sometimes not.
So when it gets reloaded? =)

Michi_de
1 Dec 2008, 12:54 AM
I know, this is some not realy easy to answer question. So i realy would be glad to see an real GWT expert to answer me this question :)
Sorry for putting this thread up again.. but i need to know if the experts have read this topic and cant help me, or they haven't noticed this thread at all.

kolli
1 Dec 2008, 4:46 AM
This is because the comboBox doesnot know that the data is changed in the database.
try changing the query for the comboBox using the setallquery method. A change in the query will trigger the call to database. Or try calling the load each time the data is entered into the database through the textbox