smith
  • Hi,
    I have been trying to render a grid using xml data from a jsp page.
    This is what I am doing:

    var ds = new Ext.data.Store({
    // load using HTTP
    proxy: new Ext.data.HttpProxy({method:"post",url: "http://server/suggestBCProject.jsp",params:{c:'0408200408540539',o:'CD280305-1515-30'}}),
    //'plants.xml',

    // the return will be XML, so lets set up a reader
    reader: new Ext.data.XmlReader({
    // records will have a "plant" tag
    record: 'options'
    }, Plant)
    });

    But this is not working.

    It works if I use something like

    proxy: new Ext.data.HttpProxy({url: 'plants.xml'})

    The output from the jsp page is the same as this xml file.

    Am I doing it correctly?

    Thx,
    Vivek.


  • An obvious problem with your code is that an Ext.data.HttpProxy () can't access a remote server (ie: a website outside of where it is called from). This is a standard Javascript security issue. Instead of having "http://server/suggestBCProject.jsp" try it with just "suggestBCProject.jsp" depending on where that file is in relation to your JS of course.

    Also, not sure if you're using FireBug there, but if not, get it and use it! It'll tell you exactly where the problems are occurring and you'll have more of an idea of what to do to fix them.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Rendering grid from a jsp page , Please add it free.
    • edit