jQWidgets Forums

jQuery UI Widgets Forums Plugins Data Adapter beforeLoadComplete does not fire

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • beforeLoadComplete does not fire #31011

    thomasR
    Member

    Using the following code i fill a listbox from JSON data. This works perfectly.
    But i have to manipulate the data before they go into the listbox.
    Reading the API beforeLoadComplete seems to be the right place.

    But beforeLoadComplete is never called. Only loadComplete.

    What’s wrong here?

    i have following data:
    {“group_memberships”:
    [{“group”:{“id”:1653,”name”:”Group 1″,…..},
    {“group”:{“id”:2440,”name”:”Group 2″,…..}
    ]
    }

    Here is thecode i use:

    var theme = “”;
    var source =
    {
    datatype: “json”,
    localdata: data,
    datafields: [
    { name: ‘id’, map: ‘group>id’ },
    { name: ‘name’, map: ‘group>name’ }
    ],
    root: ‘group_memberships’
    };

    var dataAdapter = new jQuery.jqx.dataAdapter(source,
    {
    beforeLoadComplete: function (records, original) {
    console.log(“beforeLoadComplete”);
    console.log(records);
    return records;
    },
    loadComplete: function (records) {
    console.log(“loadComplete”);
    console.log(records);
    }
    }
    );
    jQuery(“#myListBox”).jqxListBox({ source: dataAdapter, displayMember: “name”, valueMember: “id”, width: 222, height: 250, theme: theme });

    Any help is welcome.

    Best Regards
    Thomas

    beforeLoadComplete does not fire #31017

    Peter Stoev
    Keymaster

    Hi Thomas,

    Thanks for the feedback. We will look into the reported behavior about that callback function for the next version.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    beforeLoadComplete does not fire #31066

    thomasR
    Member

    Hi Peter,
    can you tell me what’s the missing link here?
    Is it JSON as data source?
    With your demos the callback seems to work. But i found only examples with arrays as input.

    When do you plan to fix this? We are currently evaluating the commercial version for one of our projects. And have to deliver a prototype shortly.

    Best Regards
    Thomas

    beforeLoadComplete does not fire #31079

    Peter Stoev
    Keymaster

    Hi Thomas,

    We will look into the reported behavior for the next version and I already added a work item. The next version would be available by the first half of November.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.