Login Register

dojo.data.ItemFileReadStore

Treeview with Json DATA

Hello,

How can I do to specify node's icon from Json data in a Tree Component

part of json data :
{ identifier: 'name',
label: 'name',
items: [
{ name:'Africa', type:'continent', icon:'continent.png'
children:[{_reference:'Egypt'}, {_reference:'Kenya'}, {_reference:'Sudan'}] },
{ name:'Egypt', type:'country' },
{ name:'Kenya', type:'country',
children:[{_reference:'Nairobi'}, {_reference:'Mombasa'}] },

docs, hacks, solutions, ..

thanks for your help.

newbie dojo.data.ItemFileReadStore shows "error getting items" when assigned json data is from javascript

Hello,

I am trying to create dojo thumbnail using following syntax.

var mess = new Array();
                //getKfJasonData returns the pics in json format from javascript
                mess[0] = getKfJsonData();                 
                thmbData.data = mess[0];
                //I get correct output here in the alert
                alert ('data: ' + thmbData.data );

dojo.data.ItemFileReadStore returns "error getting item" when assigned data is from javascript.

Hello,

I am trying to create dojo thumbnail using following syntax.

var mess = new Array();
                //getKfJasonData returns the pics in json format from javascript
                mess[0] = getKfJsonData();                 
                thmbData.data = mess[0];
                //I get correct output here in the alert
                alert ('data: ' + thmbData.data );

Why is onItem commented out in dojox.grid.data.DojoData?

In 1.0.2 there is:

// request data
        requestRows: function(inRowIndex, inCount){
                var row  = inRowIndex || 0;
                var params = {
                        start: row,
                        count: this.rowsPerPage,
                        query: this.query,
                        onBegin: dojo.hitch(this, "beginReturn"),
                        //      onItem: dojo.hitch(console, "debug"),
                        onComplete: dojo.hitch(this, "processRows") // add to deferred?

    }
    // console.debug("requestRows:", row, this.rowsPerPage);
                this.store.fetch(params);
        },

I'm loading some large data that I need to transform. I don't want to do that in onBegin, because that

Roles of DojoData model and store, now and in future?

A month ago we were speculating about the roles of the model and the store. The model seems somewhat redundant when used with a store. Since there's no definite answer and improving grid integration with dojo.data was already mentioned in grid priorities I'd like to ask for some clarification of their current/future roles.

Problem with large tree

I have written my own tree demo using a combination of techniques and I get some very funny results.

I can populate the ItemFileReadStore from the server and display a single level tree via the parser and programatically. I then tried to display a large tree using the same technique and the parser fails to load any nodes and the programatically created tree only displays a single level.

I have used firebug to get the JSON response and populate a local file. I then re-run the tests ponting my store at the local file rather than the server to check the JSON object and this works fine.

Syndicate content