/* * Isomorphic SmartGWT web presentation layer * Copyright 2000 and beyond Isomorphic Software, Inc. * * OWNERSHIP NOTICE * Isomorphic Software owns and reserves all rights not expressly granted in this source code, * including all intellectual property rights to the structure, sequence, and format of this code * and to all designs, interfaces, algorithms, schema, protocols, and inventions expressed herein. * * If you have any questions, please email
. * * This entire comment must accompany any portion of Isomorphic Software source code that is * copied or moved from this file. */ package com.smartgwt.sample.showcase.client.dataintegration.java.others; import com.smartgwt.client.data.DSRequest; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.ExportFormat; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.Canvas; import com.google.gwt.core.client.EntryPoint; public class CustomExportCustomResponseSample implements EntryPoint { @Override public void onModuleLoad() { final DataSource ds = DataSource.get("supplyItemExport"); IButton exportButton = new IButton(); exportButton.setTitle("Do Custom Export"); exportButton.setAutoFit(true); exportButton.setLeft(20); exportButton.setTop(20); exportButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { DSRequest requestProperties = new DSRequest(); requestProperties.setOperationId("customExport"); requestProperties.setExportFilename("filename.abc"); requestProperties.setExportAs(ExportFormat.CUSTOM); ds.exportData(null, requestProperties); } }); exportButton.draw(); } }