Package org.mapfish.print.processor.jasper

Examples of org.mapfish.print.processor.jasper.TableProcessor


     *       ]
     *   },
     */
    private static void setTableAttribute(final JSONObject attributes,
            final PJsonObject oldRequest, final Template template) throws JSONException {
        final TableProcessor tableProcessor = getTableProcessor(template);
        PJsonObject oldTablePage = (PJsonObject) getOldTablePage(oldRequest);

        if (tableProcessor == null) {
            if (oldTablePage == null) {
                // no table, no work
                return;
            } else {
                LOGGER.warn("The request json data has attribute information for creating the map but config does not have a" +
                            "map attribute.  Check that the request and the config.yaml are correct.");
                return;
            }
        } else if (oldTablePage == null) {
            LOGGER.warn("Configuration expects a table, but no table data is defined in the request");
            oldTablePage = new PJsonObject(oldRequest, new JSONObject(), "generated");
        }

        String tableAttributeName = "table";
        if (tableProcessor.getInputMapperBiMap().containsValue("table")) {
            tableAttributeName = tableProcessor.getInputMapperBiMap().inverse().get("table");
        }

        final JSONObject table = new JSONObject();
        attributes.put(tableAttributeName, table);

View Full Code Here


        table.put("columns", columnLabels);
        table.put("data", tableData);
    }

    private static TableProcessor getTableProcessor(final Template template) {
        TableProcessor tableProcessor = null;

        for (Processor<?, ?> processor : template.getProcessors()) {
            if (processor instanceof TableProcessor) {
                if (tableProcessor == null) {
                    tableProcessor = (TableProcessor) processor;
View Full Code Here

TOP

Related Classes of org.mapfish.print.processor.jasper.TableProcessor

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.