Results 1 to 4 of 4

Thread: Unable to access data in grid using data store or grid when using HttpProxy

  1. #1

    Question Unable to access data in grid using data store or grid when using HttpProxy

    Dear everyone:

    I checked on the forums but did not see anything related to my problem. I use HttpProxy and an XMLReader to access data from the server. It displays correctly in the grid. However, when I try to access any rows or get a count of the records using the data store getCount(); or the rowselectionmodel I can get the information. The only time that I can get values from the grid is if the user clicks a button and the function handler calls the data store function to get the total number of records.

    If I use an ArrayReader and MemoryProxy I can access anything. Please help because I tested it and am not sure what to do. I need the data from the server but I want to manipulate it when it gets to the grid.

    See sample of code below:

    ds2 = new{	        		proxy: new{		url: 'http://'+app_fullpath+'/Security_MortgageRegistration?penview&RestrictToCategory='+unid+'',	method: "GET"}),
    I use GET but on the forum I see POST. What is the difference?

    I also notice that some functions and config options used in examples on are not shown in the .js files on your website. Anyone know why?

    Please help me. Or if a post already exist then send me the url.

    T. Williams

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007


    Hi Tamara,

    I use GET but on the forum I see POST. What is the difference?
    both GET and POST are methods of getting data from client (browser) to the server. Data is always name/value pair and with GET method they are part of URL you click on, e.g.:

    There are two main issues connected with GET: (1) security - sent data is visible in the URL, (2) limited size, amount of data you can send. I would prefer POST whenever possible.

    Your server has to handle GET or POST requests, of course.

    What I would do in your case would be to rewrite both client and server scrips to use POST (maybe this is not the direct reason of the problem but for the future is POST better for sure).

    Then I'd look in the Firebug Console/Net tabs to see what is sent to server and what the server returns. Also, if necessary, you can step into routines with Firebug to see what's happening.

    Maybe it'll be easy to determine the problem after gathering this data.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy

  3. #3

    Exclamation Still unable to access data in grid

    I went into Firefox. There are no errors when I run my code. The sample data is below

    <?xml version="1.0" encoding="UTF-8" ?>
    I checked using the Firebug tabs - Script and Net. I also set breakpoints. I don't really understand the code in the ext-all.js etc. I use the similiar code for MemoryProxy and ArrayReader. However, I store the data in a textfield on my form. I can access the data usin g the data store and grid functions in that code.

    The only difference with this code is the HttpProxy and XMLReader that is why I don't understand why I cannot get anything with I try to use the data store and grid functions. Are there additonal config options that I should be using with the data store?

  4. #4
    Sencha User
    Join Date
    Mar 2007


    Look at the console tab in Firebug - you'll see what's posted and the response object. Use ext-all-debug.js so you can read the code as you step thru. If you have not already, look at the sticky thread about debugging with firebug.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts