Package com.ponysdk.core

Examples of com.ponysdk.core.StreamResource


        update.put(PROPERTY.NAME, this.name);
        Txn.get().getTxnContext().save(update);
    }

    public void submit() {
        final StreamResource streamResource = new StreamResource();
        streamResource.embed(streamHandler, this);
    }
View Full Code Here


        downloadImageButton.addClickHandler(new PClickHandler() {

            @Override
            public void onClick(final PClickEvent event) {
                final StreamResource streamResource = new StreamResource();
                streamResource.open(new StreamHandler() {

                    @Override
                    public void onStream(final HttpServletRequest request, final HttpServletResponse response) {
                        response.reset();
                        response.setContentType("image/png");
View Full Code Here

        final JasperReport report = DynamicJasperHelper.generateJasperReport(dynamicReport, new ClassicLayoutManager(), new HashMap<Object, Object>());

        final byte[] reportBytes = JasperRunManager.runReportToPdf(report, new HashMap<Object, Object>(), new DynamicExportDataSource(records));

        // Set MIME type to binary data to prevent opening of PDF in browser window
        final StreamResource streamResource = new StreamResource();
        streamResource.open(new StreamHandler() {

            @Override
            public void onStream(final HttpServletRequest req, final HttpServletResponse response) {
                response.reset();
                response.setContentType("application/pdf");
View Full Code Here

        update.put(PROPERTY.IMAGE_URL, url);
        Txn.get().getTxnContext().save(update);
    }

    public void setStream(final StreamHandler streamListener) {
        final StreamResource streamResource = new StreamResource();
        streamResource.embed(streamListener, this);
    }
View Full Code Here

        return NAME;
    }

    @Override
    public String export(final List<ExportableField> exportableFields, final List<T> records) throws Exception {
        final StreamResource streamResource = new StreamResource();
        streamResource.open(new StreamHandler() {

            @Override
            public void onStream(final HttpServletRequest req, final HttpServletResponse response) {
                try {
                    response.reset();
View Full Code Here

        return PString.get("export.result", records.size(), fileName);
    }

    public void exportXMLString(final String fileName, final String content) throws Exception {
        // Set MIME type to binary data to prevent opening of PDF in browser window
        final StreamResource streamResource = new StreamResource();
        streamResource.open(new StreamHandler() {

            @Override
            public void onStream(final HttpServletRequest req, final HttpServletResponse response) {
                response.reset();
                response.setContentType("application/xml");
View Full Code Here

TOP

Related Classes of com.ponysdk.core.StreamResource

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.