jQWidgets Forums

jQuery UI Widgets Forums General Discussions Navigation Tree Dataadapter ignores source type and data

This topic contains 1 reply, has 1 voice, and was last updated by  Frogomat 12 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Dataadapter ignores source type and data #11756

    Frogomat
    Participant
    var source =
    {
    datatype: "xml",
    type: 'POST',
    data: {sessionId: sessionId, mode: 'show.organisationsEinheitenListe'},
    datafields: [... ],
    root: "document",
    record: "organisationsEinheit",
    id: 'id',
    url: '/easis/servlet/organisationsEinheitenServlet'
    };
    var orgEinheitenListeDataAdapter = new $.jqx.dataAdapter(source , {
    downloadComplete: function (data, status, xhr) { },
    loadComplete: checkForSessionTimeOut,
    async: false,
    loadError: function (xhr, status, error) { alert(error);}
    });

    When the .dataBind() Method is called, the request ins not of the type POST and no data (sessionId and mode) is sent to the server. But the right servlet from the source is called. Debug shows that dataAdapter[‘_source’] contains all informations given right before the dataBind() method is called.
    We found a way around it by adding “type: POST” and “data” to the adapter but is this the way it should be used?

      var orgEinheitenListeDataAdapter = new $.jqx.dataAdapter(orgEinheitenListeSource, {
    downloadComplete: function (data, status, xhr) { },
    loadComplete: checkForSessionTimeOut,
    async: false,
    type: 'POST',
    data: {sessionId: sessionId, mode: 'show.organisationsEinheitenListe'},
    loadError: function (xhr, status, error) { alert(error);}
    });

    We use this to fill a tree element but there is no subforum for source and adapters so i post it in here.

    Dataadapter ignores source type and data #11999

    Frogomat
    Participant

    Can someone please explain this behavior to me?

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

You must be logged in to reply to this topic.