Comments (4)
Can you provide a sample example that does reproduce your issue? Or at least a code excerpt that shows how you do your polling / refresh?
Thanks.
from dojo-calendar.
Christophe,
Thank you for helping us. We are very excited about this new control you have built.
In my startup() I do: (
var o = {
start: stamp.toISOString(interval[0], opts),
end: stamp.toISOString(interval[1], opts)
};
this.query = o;
calendar.set("store", new Observable(new JsonRestStore({target: "appointments/"})));
and then, whenever the interval changes,
var o = {
start: stamp.toISOString(interval[0], opts),
end: stamp.toISOString(interval[1], opts)
};
var results = this.store.query(o, { overwrite: true });
results = results.map(lang.hitch(this, function(item){
return this.itemToRenderItem(item, this.store);
}));
when(results, lang.hitch(this, "_initItems"));
and I poll that (refresh that call ) every 30 seconds. At first I thought all was well, and then I noticed my Firebug HTML inspector scrollbar grow and grow every 30 seconds. It is overlaying the events, instead of refreshing them.
We can do a teamviewer if this would help you. Let me know. We can also support this project financially.
Pete
from dojo-calendar.
Thanks for your kind words. So you are re-executing that piece of code:
var results = this.store.query(o, { overwrite: true });
results = results.map(lang.hitch(this, function(item){ return this.itemToRenderItem(item, this.store); })); when(results, lang.hitch(this, "_initItems"));
on each poll request?
If yes then I understand why you get that behavior. For the items to be correctly updated automatically and not re-created you need to rely on the store observation mechanism. And that's not what you are apparently doing. I guess because JsonRest does not provide a polling mechanism so you implemented it yourself.
So you either needs to wrap JsonRest and implement a polling mechanism to correctly notify Observable of data changes or if you still want to manage that in your code you are probably better of calling _updateItems than _initItems as you do now. Indeed _updateItems will make sure to not create items but just updates them.
from dojo-calendar.
I'm closing this issue as Christophe seems to have answered correctly. If something is still unclear, we can reopen it.
from dojo-calendar.
Related Issues (20)
- subColumns and styleGridCell HOT 9
- setting subColumn attribute after instantiation fails HOT 3
- Auto detect today changes HOT 1
- Problem setting the start time of day at initialization HOT 4
- time.newDate does not work with "number" object HOT 1
- Crash in column view with expanded top row HOT 1
- Layout of current time indicator is crashing when using non Gregorian calendars (Arabic, Hebrew)
- Issue with custom expand renderer HOT 12
- dojox/calendar: itemClick doesn't fire on some (faster) devices HOT 2
- Time label not displayed
- Error in demo page HOT 2
- Calendar is not refreshed after store is updated HOT 1
- There are two functions named `refreshRendering` in ColumnView.js HOT 1
- always respect dateClassObj when constructing new date objects HOT 1
- Installing dojox with bower is not downloading Calendar HOT 1
- Variable error in MonthColumnView.js HOT 1
- StoreManager does not use the Identity from the item if it is different of "id" HOT 2
- Typo bug at StorageManager
- use dateLocaleModule for all date calculations
- simplecolumnview is not using date-local-module to instantiate date-object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dojo-calendar.