wizman
4 Jan 2011, 10:55 AM
Hello,
I am working on an iPhone offline App (all is data cached in the local SQLite and all files are manifested).
All of the panels and other Ext elements are created, displayed and handled perfectly.
Sencha had really been a pleasure.
I'm having trouble with handling events and updating data structures.
Q1: how do i update a panel with new information?
I have a panel with various panels in it (buttons, textFields, html etc...), i want some new data to be saved to the db (have that part covered) and that this entire panel will be reloaded again with the new data.
pseudo code:
function getPanel(data) {
...
// prepare this panel according to the data
...
id: 'updateMePanel';
items: [
someButtonHandler: function() {
// save stuff to the local DB, read/set new data to newData
mainPanel.update('updateMePanel', getPanel(newData));
// or
mainPanel.remove('updateMePanel');
mainPanel.add(getPanel(newData));
}
]
}
var mainPanel = new Ext.Panel({
...
items:[getPanel(data)]
});
Q2: can i please see a simple code example where i update/reload a store's (specifically used in a NestedList) data?
this will also be read from the DB and parsed with a 'memory' proxy.
Thanks
I am working on an iPhone offline App (all is data cached in the local SQLite and all files are manifested).
All of the panels and other Ext elements are created, displayed and handled perfectly.
Sencha had really been a pleasure.
I'm having trouble with handling events and updating data structures.
Q1: how do i update a panel with new information?
I have a panel with various panels in it (buttons, textFields, html etc...), i want some new data to be saved to the db (have that part covered) and that this entire panel will be reloaded again with the new data.
pseudo code:
function getPanel(data) {
...
// prepare this panel according to the data
...
id: 'updateMePanel';
items: [
someButtonHandler: function() {
// save stuff to the local DB, read/set new data to newData
mainPanel.update('updateMePanel', getPanel(newData));
// or
mainPanel.remove('updateMePanel');
mainPanel.add(getPanel(newData));
}
]
}
var mainPanel = new Ext.Panel({
...
items:[getPanel(data)]
});
Q2: can i please see a simple code example where i update/reload a store's (specifically used in a NestedList) data?
this will also be read from the DB and parsed with a 'memory' proxy.
Thanks