Hybrid View

  1. #1
    Ext User
    Join Date
    Apr 2010
    Posts
    1
    Vote Rating
    0
    p.pumanee is on a distinguished road

      0  

    Default Error when render PivotGrid : Adobe AIR runtime security violation for JavaScript cod

    Error when render PivotGrid : Adobe AIR runtime security violation for JavaScript cod


    Hi, everybody

    I get error when render PivotGrid in Adobe air

    "Adobe AIR runtime security violation for JavaScript code in the application security sandbox (eval)"

    Code:
    Ext.onReady(function() {
    	
        var SaleRecord = Ext.data.Record.create([
            {name: 'name',   type: 'string'},
            {name: 'color',  type: 'string'},
            {name: 'thick',    type: 'string'},
            {name: 'price',  type: 'int'}
        ]);
        
        
        
        var myStore = new Ext.data.Store({
            url: 'simple.json',
            autoLoad: true,
            reader: new Ext.data.JsonReader({
               root: 'rows',
               idProperty: 'id'
            }, SaleRecord)
        });
        
        var pivotGrid = new Ext.grid.PivotGrid({
            title     : 'PivotGrid example',
            anchor     : "100%",
            height    : 259,
            renderTo  : document.body,
            store     : myStore,
           	aggregator: 'sum',
            measure   : 'price',
            viewConfig: {
                title: 'Name'
            },
            
            leftAxis: [
                {
                    width: 80,
                    dataIndex: 'name'
                }
            ],
            topAxis: [
                {
                    dataIndex: 'color'
                },
                {
                    dataIndex: 'thick'
                }
            ]
        });
    });
    simple.json

    Code:
    {
        "rows": [{
        	"id": "1",
        	"name": "test01",
        	"color": "black",
        	"thick": "0.1 mm",
        	"price": "200"
        },{
        	"id": "2",
        	"name": "test01",
        	"color": "black",
        	"thick": "0.2 mm",
        	"price": "400"
        },{
        	"id": "3",
        	"name": "test01",
        	"color": "black",
        	"thick": "0.3 mm",
        	"price": "400"
        },{
        	"id": "4",
        	"name": "test01",
        	"color": "black",
        	"thick": "0.4 mm",
        	"price": "400"
        },{
        	"id": "5",
        	"name": "test01",
        	"color": "white",
        	"thick": "0.1 mm",
        	"price": "200"
        },{
        	"id": "6",
        	"name": "test01",
        	"color": "white",
        	"thick": "0.2 mm",
        	"price": "400"
        },{
        	"id": "7",
        	"name": "test01",
        	"color": "white",
        	"thick": "0.3 mm",
        	"price": "400"
        },{
        	"id": "8",
        	"name": "test01",
        	"color": "white",
        	"thick": "0.4 mm",
        	"price": "400"
        },{
        	"id": "9",
        	"name": "test02",
        	"color": "black",
        	"thick": "0.1 mm",
        	"price": "200"
        },{
        	"id": "10",
        	"name": "test02",
        	"color": "black",
        	"thick": "0.2 mm",
        	"price": "400"
        },{
        	"id": "11",
        	"name": "test02",
        	"color": "black",
        	"thick": "0.3 mm",
        	"price": "400"
        },{
        	"id": "12",
        	"name": "test02",
        	"color": "black",
        	"thick": "0.4 mm",
        	"price": "400"
        },{
        	"id": "13",
        	"name": "test02",
        	"color": "white",
        	"thick": "0.1 mm",
        	"price": "200"
        },{
        	"id": "14",
        	"name": "test02",
        	"color": "white",
        	"thick": "0.2 mm",
        	"price": "400"
        },{
        	"id": "15",
        	"name": "test02",
        	"color": "white",
        	"thick": "0.3 mm",
        	"price": "400"
        },{
        	"id": "16",
        	"name": "test02",
        	"color": "white",
        	"thick": "0.4 mm",
        	"price": "400"
        }]
    }
    help me please.

  2. #2
    Sencha User makana's Avatar
    Join Date
    Apr 2008
    Location
    Dresden, Germany
    Posts
    526
    Vote Rating
    17
    makana has a spectacular aura about makana has a spectacular aura about

      0  

    Default


    Hi p.pumanee,

    It is because XTemplates have to be created before any Ext.onReady. And in Ext.grid.PivotGridView a templates (templates.gcell) should be created during runtime.

    There's currently no default template defined in the ext-air package. It is a bug and I will fix it.

    For now, just define a gcell template. Since it is not used in a default PivotGrid (I wonder why it is created at all) it should suffice something like:
    Code:
    viewConfig: {
        templates: {
            gcell: true // something that is not empty
        }
    }
    Best regards,
    makana
    Programming today is a race between software engineers striving to build bigger and better іdiot-proof programs, and the universe striving to produce bigger and better idiots. So far, the universe is winning. (Rick Cook)

    Enhanced ExtJS adapter for Adobe AIR

Similar Threads

  1. Replies: 7
    Last Post: 30 Dec 2009, 6:19 PM
  2. AIR runtime security violation with sandbox issu!! plz help me.
    By Erica in forum Ext.air for Adobe AIR
    Replies: 8
    Last Post: 20 Feb 2009, 3:23 PM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar