Package info.jtrac.util

Examples of info.jtrac.util.ExcelUtils


       
        add(new Link("exportToExcel") {
            public void onClick() {
                // temporarily switch off paging of results
                itemSearch.setPageSize(-1);
                final ExcelUtils eu = new ExcelUtils(getJtrac().findItems(itemSearch), itemSearch);
                // restore page size
                itemSearch.setPageSize(pageSize);
                getRequestCycle().setRequestTarget(new IRequestTarget() {
                    public void respond(RequestCycle requestCycle) {
                        WebResponse r = (WebResponse) requestCycle.getResponse();
                        r.setAttachmentHeader("jtrac-export.xls");
                        try {
                            Map<Name, String> labels = BasePage.getLocalizedLabels(ItemListPanel.this);
                            eu.exportToExcel(labels).write(r.getOutputStream());
                        } catch (IOException e) {
                            throw new RuntimeException(e);
                        }
                    }
                    public void detach(RequestCycle requestCycle) {
View Full Code Here

TOP

Related Classes of info.jtrac.util.ExcelUtils

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.