Sorry, should have been more clear the first time.... I want to present to my users (client side) collection of objects (rows). This collection however can change over time server side so I would like to synchronize it with clients. As mentioned before I'm using table to display my collection and I poll server from time to time to see if anything was removed from collection - if there were changes a delta is send to client and removed from the table. In the mean time however new items could have been added on the server so when I remove some row client side I would like to check for next couple of rows from lastIndex and add them to table at the end (say lastIndex + newRows(upto 50)) without the need to clear whole cache.
A shorter way of describing it - I'm trying to implement queue using table and remote model. Small modification is that elements can be removed not only from head of queue but from the middle as well, therefore I'm polling for removed objects. thron7-2 wrote: > > I'm not sure I'm following you here... > >> I have a table with remote model behind it. >> >> I was wondering how can I refresh add content to Remote model without >> refreshing the whole cache. > > What does that mean? You want to add/update content to the model on the > client side, through user interaction? Or do you want to update it from > the server? Are you speaking of the model cache? My understanding is > that it is managed by the Remote model, and by default would never clear > the whole cache (see the clearCacheOnRemove and maxCachedBlockCount > properties). > Yes, I want to update it from the server. thron7-2 wrote: > >> I would like to do it in similar fashion as I can removeRow which removes >> row from the table and decreases the count. > > Would do what? You can use setValue to update table cells in the model. > What I cannot find is a possibility to insert completely new rows. - Can > anyone of the table experts comment on this?! > Yes, want to insert completely new rows or force model to fetch next couple of rows without removing cache. thron7-2 wrote: > >> >> What I'm trying to achieve is to have remote table model which is >> initiated >> from the server but then every now and then updates are sent to the >> client >> async to remove or add row. > > Ah, so the updating is done from the server! And you want to update on > individual rows, and not invalidate the whole model cache, right?! My > impression is that all model rows are identified by an index. So if you > e.g. poll the server once in a while for changed row indexes (with a > normal remote.Request), it could return them in a list, and you could > then call getRowData() for each of them, to update those specific records. > > If a row has been *inserted* on the server, I think that would > invalidate all of the indexes of the table anyway, and you are probably > forced to re-load the records, clearing the cache. > > But that's just my understanding. > Yes, from the server. The row would be *inserted* on the server but at the end, so as soon I remove something on client side I want to get some more rows from the end without clearing cache. thron7-2 wrote: > > T. > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > -- View this message in context: http://qooxdoo.678.n2.nabble.com/Dynamic-updates-to-Remote-model-of-Table-tp5549949p5553996.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
