Package com.smartgwt.client.data

Examples of com.smartgwt.client.data.OperationBinding


        DataSourceTextField capital = new DataSourceTextField("capital", "Capital");
        countryDS.setFields(countryCode, countryName, capital);

        countryDS.setOperationBindings();

        OperationBinding fetch = new OperationBinding(DSOperationType.FETCH, "data/dataIntegration/xml/responses/country_fetch.xml");
        OperationBinding add = new OperationBinding(DSOperationType.ADD, "data/dataIntegration/xml/responses/country_add.xml");
        OperationBinding update = new OperationBinding(DSOperationType.UPDATE, "data/dataIntegration/xml/responses/country_update.xml");
        OperationBinding remove = new OperationBinding(DSOperationType.REMOVE, "data/dataIntegration/xml/responses/country_remove.xml");

        countryDS.setOperationBindings(fetch, add, update, remove);

        final ListGrid countryGrid = new ListGrid();
        countryGrid.setWidth(500);
View Full Code Here


            protected void transformResponse(DSResponse response, DSRequest request, Object data) {
                super.transformResponse(response, request, data);
            }
        };
        DataSourceTextField countryCode = new DataSourceTextField("countryCode", "Code");
        OperationBinding fetch = new OperationBinding();
        fetch.setOperationType(DSOperationType.FETCH);
        fetch.setDataProtocol(DSProtocol.POSTMESSAGE);
        OperationBinding add = new OperationBinding();
        add.setOperationType(DSOperationType.ADD);
        add.setDataProtocol(DSProtocol.POSTMESSAGE);
        OperationBinding update = new OperationBinding();
        update.setOperationType(DSOperationType.UPDATE);
        update.setDataProtocol(DSProtocol.POSTMESSAGE);
        OperationBinding remove = new OperationBinding();
        remove.setOperationType(DSOperationType.REMOVE);
        remove.setDataProtocol(DSProtocol.POSTMESSAGE);
        countryDS.setOperationBindings(fetch, add, update, remove);


        countryCode.setPrimaryKey(true);
        countryCode.setCanEdit(false);
View Full Code Here

        String updateURL = (baseUrl + "/api/update/" + result
            .get("name"));
        String removeURL = (baseUrl + "/api/remove/" + result
            .get("name"));

        OperationBinding remove = new OperationBinding(
            DSOperationType.REMOVE, removeURL);
        OperationBinding update = new OperationBinding(
            DSOperationType.UPDATE, updateURL);
        OperationBinding add = new OperationBinding(
            DSOperationType.ADD, addURL);
        OperationBinding fetch = new OperationBinding(
            DSOperationType.FETCH, fetchURL);

        fetch.setDataFormat(DSDataFormat.JSON);
        add.setDataFormat(DSDataFormat.JSON);
        update.setDataFormat(DSDataFormat.JSON);
        remove.setDataFormat(DSDataFormat.JSON);
        dataSource.setOperationBindings(fetch, add, update, remove);
View Full Code Here

TOP

Related Classes of com.smartgwt.client.data.OperationBinding

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.