1. #11
    Ext User r2k's Avatar
    Join Date
    Aug 2007
    Posts
    67
    Vote Rating
    0
    r2k is on a distinguished road

      0  

    Default lastest

    lastest


    i hope that this helps

    This is wheer i got the data

    Code:
    store	: new Ext.data.Store({
        proxy		: new Ext.data.HttpProxy({url : 'data/detObject.asp'}),
        id			: 'name',
        reader		: new Ext.data.XmlReader({
            record		: 'data',
            id			: '@nom'
            },
            [{name: 'tname', mapping: '@nom'},
            {name: 'tvalue', mapping: '@val'}]
        ),
        listeners	:{
            'load'	: function(	oDts, oRecs, oOpts){
                var cont;
                Ext.getCmp('grdXXXX').store.removeAll();
                for(cont=0;cont < oRecs.length;cont++ ){
                    if(oRecs[cont].get('tname') == 'blabla'){
                        Ext.getCmp('tpYYYY').form.findField("txtXXXX").setValue(oRecs[cont].get('tvalue'));
                        continue;
                    }
                    Ext.getCmp('grdXXXX').store.loadData(oRecs[cont].data,true);
                    Ext.getCmp('grdXXXX').getView().refresh();
                }
                Ext.getCmp('grdXXXX').store.commitChanges();
            }
        }
    })

    This is inside a Ext.Window


    grid code
    Code:
    {
        title	: '...',
        xtype	: 'grid',
        id		: 'grdFTec',
        store	: new Ext.data.Store({
                proxy		: new Ext.data.MemoryProxy([]),
                id			: 'dtsExtra',
                reader		: new Ext.data.ArrayReader({},[{name: 'tname'},{name: 'tvalue'}])
        }),
        columns		: [
            {header	: "Property", width: 200, sortable: true, dataIndex: 'tname'},
            {header	: "Value", width: 120, sortable: true, dataIndex: 'tvalue'}
        ],
        viewConfig	: {
            forceFit: true
        },
        listeners	: {
            'render' : function(oGrd){
                oGrd.getStore().load();
            }	
        }
    }

    this is in a Ext.Window --> TabPanel
    [extjs 2.2]
    [Browsers: IE(6/7/8), FF (3.0.8), chrome 2.0]

  2. #12
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    2
    tryanDLS is on a distinguished road

      0  

    Default


    Doesn't that code get you into an infinite loop - loadData fires the load event again and you're going to go back thru that code all over??

  3. #13
    Ext User r2k's Avatar
    Join Date
    Aug 2007
    Posts
    67
    Vote Rating
    0
    r2k is on a distinguished road

      0  

    Default


    No becuase the load event is fired by me only when the window where the formpanel and a grid panel resides is shown...

    this is the basic behavior of my app
    HTML PAGE ---> Doubleclick ---> Fire show event ---> load the HTTPProxy datastore ---> process the data ---> fill the form and MemoryProxy Datastore from the grid ---> finaly show the window

    because i'm in control of the events never enter in an infinite loop

    i'm not posting full code because the most part is declarations and ui management functions ... irrelevant i suppose to this topic

    2 differents Datastores


    CODE in Green is the gridpanel declaration with the datastore
    CODE in blue is from the Ext.window where i loading the data to process
    [extjs 2.2]
    [Browsers: IE(6/7/8), FF (3.0.8), chrome 2.0]

  4. #14
    Ext User r2k's Avatar
    Join Date
    Aug 2007
    Posts
    67
    Vote Rating
    0
    r2k is on a distinguished road

      0  

    Default


    anyone can help me if i'm overseeing something... ?
    if need more code only ask for it ...
    [extjs 2.2]
    [Browsers: IE(6/7/8), FF (3.0.8), chrome 2.0]

  5. #15
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    What is your problem, to load the form based on a record?

  6. #16
    Ext User r2k's Avatar
    Join Date
    Aug 2007
    Posts
    67
    Vote Rating
    0
    r2k is on a distinguished road

      0  

    Default


    my problem is that the grid doesn't load the data

    when i do this
    Code:
         Ext.getCmp('grdXXXX').store.loadData(oRecs[cont].data,true);
         Ext.getCmp('grdXXXX').getView().refresh(); // Error here

    firebug says that
    Code:
    this.grid is undefined
    in extjs-all-debug.js
    Code:
    31590 refresh : function(headersToo){
    31591      this.fireEvent("beforerefresh", this);
    31592      this.grid.stopEditing(true); //<---- ERROR!!!!!!! 
    31593
    31594       var result = this.renderBody();
    31595       this.mainBody.update(result);
    31596
    31597       if(headersToo === true){
    31598             this.updateHeaders();
    31599             this.updateHeaderSortState();
    31600       }
    31601       this.processRows(0, true);
    31602       this.layout();
    31603       this.applyEmptyText();
    31604       this.fireEvent("refresh", this);
    31605 }
    [extjs 2.2]
    [Browsers: IE(6/7/8), FF (3.0.8), chrome 2.0]

  7. #17
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Suggest you step through and debug or post a working showcase.

    http://extjs.com/learn/Ext_Forum_Hel...rking_showcase

  8. #18
    Ext User r2k's Avatar
    Join Date
    Aug 2007
    Posts
    67
    Vote Rating
    0
    r2k is on a distinguished road

      0  

    Default working showcase or something like that

    working showcase or something like that


    This Is my working showcase the only Problem is that that must be in a real webserver to work because retrieve xml files that i'm includind in the file and need to use the HTTP GET method. everything needed is in ZIP file

    i hope taht someone can help me

    warning: my app is still pre-alfa
    i will be happy if anyone can giveme recommendation based on my work to improve my coding
    (except put comments in the code)

    testcase.zip
    [extjs 2.2]
    [Browsers: IE(6/7/8), FF (3.0.8), chrome 2.0]

  9. #19
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Well, I set breakpoints and stepped through and see what's happening. Have you done that?

    Why are you making your question for this thread so complicated. You have asked how to load data into a form or grid. You've got drag/drop and whatever else going on.

    It just surprises me when people have a relatively simple isolated problem and they don't bother to isolate it to see what's going on...or debug it.

  10. #20
    Ext User r2k's Avatar
    Join Date
    Aug 2007
    Posts
    67
    Vote Rating
    0
    r2k is on a distinguished road

      0  

    Default


    i debugged but not understand really what's happening i know that the object that is getting refresh function is not the adequate ... but why .... i don't know .... i debugged but my understanding of the extjs is not so welll to know whats happening .... i really suspect that is some of the 2 possibilities

    (1) - Is an scope problem
    (2) - is not the rigth object to call to refresh and that is why i'm getting that error

    but how i reiterate ... my understanding of extjs is not so welll to detect my problem here...

    sorry if i'm annoying you but is my situation thank you for you help ...
    [extjs 2.2]
    [Browsers: IE(6/7/8), FF (3.0.8), chrome 2.0]

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