Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Custom DSRequest

    Hi,
    i'm developing on SmartGWT Power 3.0.

    I have a question about the framework client-side.

    In this case, i'm not using SmartGWT server code, i'm using my custom server code.

    I'm trying to send to the server a custom DSRequest.
    The problem is that i am not able to send a POST http request.

    The following code generates a GET http request. Why?


    DataSource dataSource = new DataSource("MyServletURL");
    dataSource.setClientOnly(true);
    dataSource.setDataTransport(RPCTransport.XMLHTTPREQUEST);
    dataSource.setDataProtocol(DSProtocol.POSTPARAMS);
    this.timerListGrid.setDataSource(dataSource);

    this.timerListGrid.fetchData(this.timerListGrid.getCriteria(), new DSCallback() {

    @Override
    public void execute(DSResponse response, Object rawData, DSRequest request) {

    SC.say("callback");
    }
    });


    Thank you in advance.

    Giervella
    Last edited by giervella; 30 Jan 2013, 02:17.

    #2
    The code you've shown would work fine, but if the real code either subclasses RestDataSource or uses operationBindings, then you need to set the dataProtocol on the operationBinding.

    Comment

    Working...
    X