1. #1
    Ext JS Premium Member
    Join Date
    Oct 2011
    Posts
    7
    Vote Rating
    0
    william1000 is on a distinguished road

      0  

    Default Dynamic Store Configuration

    Dynamic Store Configuration


    I'm new to Ext Designer and have a question on how to dynamically create the proxy / store URL for loading data from the server.

    For example, let's say I want to load a list of orders for a particular customer using a Store. The server-side URL that handles order may be "userOrders.php". One of the arguments the server expects is the customer-id, so that the server will select only the orders for a particular customer.

    How would I do this in Ext Designer? How do I pass dynamic arguments to the URL field for a proxy / store?

    Thanks!

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    The only recomendation I can give to you is dont use Designer's stores, write it by hand and instantiate in the initComponent() method.

    Designer's support for models and stores is weak to my point of view.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    13
    Vote Rating
    0
    gwinning is on a distinguished road

      0  

    Default


    Assuming you know about the.js file generated that you edit to add your event handlers, the below code is what worked for me to call the relative url to a .p (similar to a .php) with parameters.

    onBtnGroupClick: function() {
    try{
    var strSearch = Ext.getCmp("txtGroup").getValue();
    if (strSearch == "") {
    alert("You must enter a group to search for.");
    return;
    }
    var cs = Ext.StoreMgr.get("CustStore");
    var myProxy = cs.getProxy();
    myProxy.url = "/scripts/codexdv1.wsc/JSONFindCustomer.p?Mode=GroupName&FilterValue=" + strSearch;
    cs.load();
    }
    catch(err){
    alert("Error in BtnGroupClick: \n\n" + err.description);
    }
    }

Thread Participants: 2

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