PDA

View Full Version : Update data



lombras
17 Feb 2010, 4:25 AM
Hello!

I am developing an application with EXT Desktop and am having some problems with outdated data.

Suppose I have a directory of categories and a directory of products, and in the register of products I need to choose a category.

If the user open categorie´s and product´s window and he enters a new category, the categories date in products is not updated, that is where my question is, how can I do to update this data?


Thanks!

Eugen_
17 Feb 2010, 4:33 AM
Hi lombras,

Can you give us some parts of your code to find an error?

lombras
17 Feb 2010, 4:42 AM
Hello Eugen!!

There is no error! ;)

My English is bad, I try to be more clear!

What happens is the following:

1 - The user opens the categories (load store categories)
2 - User opens the window product (load another store with categories)
3 - The User enters a new category (1)
4 - the store of categories of products is not updated (3), and the User can only see a category added after you close and reopen the window.

I want to avoid what he has to close and open the window to update the data.

Is it possible?

Eugen_
17 Feb 2010, 4:52 AM
another store with categories)
4 - the store of categories of products is not updated (3)

What do you use to show the category list in the products window? Ext.form.Combobox?

lombras
17 Feb 2010, 5:10 AM
its a tree!!

Ps: i use this tree in another 3 windows.

I think I have to create a kind of listener, and when the store is updated I have to replicate to the other places.

The problem is that different modules and are not directly linked.

I have my products.js , categories.js, kits.js and within each one I load a store categories.

Mike Robinson
17 Feb 2010, 7:30 AM
3 - The User enters a new category (1)
4 - the store of categories of products is not updated (3), and the User can only see a category added after you close and reopen the window.If this is "steps 3 and 4," what is your "step 3.1?" What happens between steps 3 and 4? Or rather, what needs to happen?

"So, the user has entered a new category ... so what happens next?"

If you "add" or "insert" the record into the Store, using the appropriate methods of the Store object (not direct manipulation of its data-structures), the Store will inform the various grids and so-forth that its data has changed, and they will redraw themselves.

Also, if the Store has a "Writer" object attached to it, the Store will send a request to the host, to tell it what you did so that the host can do the same thing. The row will show-up in the grid with a little "flag" in the corner of each box (indicating that the record is "being updated"), then, when the host acknowledges the request, the flag will vanish.