[FIX] dhtmlxDataView load new url, dynamic loading Bug


i’ve using dhtmlxDataView as a media pool with many pictures(such >250k), and it performs well, thank you for the powerful engine :wink:

But i implemented a search field, to search by type or url of the media in the pool and there is no common solution with a server backend yet, only filterBy(); but this doesnt work, because the browser does not hold the complete pool, so i do this, in the common dhtmlx way, clear and load again, so my code looks like this:

var dataViewObject = new dhtmlXDataView();

The problem is, that if you want to change the url, the dhtmlxDataView does not load dynamically from the new url( someurl.xml?search=mysearchquery ), it takes the old and ( someurl.xml ), so the dynamically loaded content from the new source will never survice to the UI and the component breaks down…

So i’ve found a solution and thats why i post it here, because maybe other members of the community have the similar problem and dismiss the dataview and go one step back to folders, because of that problem, so here is the solution:

dhtmlx.DataLoader component( dhtmlxdataview_debug.js, line 4085), search the follow code line:

if (!this.data.feed)

and replace it with this:

if (url.indexOf("posStart")==-1 || !this.data.feed)

So i hope i can help you, solving the little problem(with big results), if the problem is solved some time ago, just post the topic, but in the last download(yesterday), the problem wasnt resolved, so because of that, i’ve posted this…

thanks and bye

Thanks, I’ve had this problem too. And your solution really helped.
But after loading new data there is no refresh of the box.
view.clearAll() clears it, but it remains blank. I put a view.refresh after the view.load, but without effect. I believe it has to do with asyncronous loading, the refresh has to be called sometimes later.

Any ideas?

Hi folks,
I’ve found a solution:

view.load(url,'xml',function() { view.refresh(); } );

will do the trick.

Good luck!