1. #1
    Ext User
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    50
    Vote Rating
    0
    young_matthewd is on a distinguished road

      0  

    Default handling dwr calls and mystery remove function

    handling dwr calls and mystery remove function


    really a two part question....

    (1) every time I call dwr functions that return arrays (lists) the data object passed to the callback function has an extra "remove" function attached. same thing happens if I define record variables ("var records = []. must be missing something basic? is this the Ext adding functions behind the scens?

    (2) would like to push the json object (list of values) into a Ext.View without defining private proxies (ie. extending Store/Reader as Animal has shown in the forum). maybe this has to be done. but right now i would be relaxed just mimicing Jack's blob page which uses JsonView and a Template to gather data from the "posts" root. he does this via the updateManager. i would like to have dwr return my data and just pass the json object to the JsonView. nothing complex. or?


    thanks in advance / matthew

  2. #2
    Ext User
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    50
    Vote Rating
    0
    young_matthewd is on a distinguished road

      0  

    Default cheated a dirty solution

    cheated a dirty solution


    made a quick solution but looking for a better way....

    the dwr call returns data (json) through a callback parameter as below:

    Code:
      ResursService.findByIDArray(
        this.objectEval(el.getValue()), 
        this.showResults.createDelegate(this)
      );
    the delegate is need for scoping. inside showResults I access the jsonData property directly and call refresh. main dislike is the direct property access rather than runing through a public method (ie. interface rather than hard coding):

    Code:
      var el = this.el.child('.search-results');
    			
      var tpl = new Ext.Template(
        '<div class="entry">' +
          '{beteckning}' +
          '<h4>{tstamp} by {skapadid}</h4>' +
          '</div><hr />'
      );
    
      var view = new Ext.JsonView(
        el,
        tpl
      );
    			
      view.jsonData = data;
      view.refresh();

    as far as the tacked on remove function...doesn't seem to disturb the refresh inside the JSONView. still would like to know why this function is added to all array objects?

    when i get farther in my application development a better json solution would be to create a DataProxy like Animal has done. but to get up and going there must be a better way to pass raw json directly to the JSONView without going via the updateManager. or?

Similar Threads

  1. How to refer to a Function 1 Image() Array in Function 2?
    By Bobafart in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 24 Feb 2007, 8:33 PM
  2. multiple calls to contentPanel.setUrl()
    By snid in forum Ext 1.x: Bugs
    Replies: 0
    Last Post: 9 Feb 2007, 1:24 PM
  3. setTimeout calls yui or yui-ext class member
    By dlibby00 in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 7 Feb 2007, 8:27 AM
  4. Replies: 7
    Last Post: 21 Jan 2007, 5:57 PM
  5. Abort previous LoadableDataModel.loadPage calls
    By kalebwalton in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 5 Jan 2007, 9:49 AM

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