Package org.concordion.internal

Examples of org.concordion.internal.TableSupport


            }
        }
    }

    private void executeTable(final CommandCall commandCall, final Evaluator evaluator, final ResultRecorder resultRecorder) {
        final TableSupport tableSupport = new TableSupport(commandCall);

        // this is the bit that's different: also execute on the header
        tableRow.set(TableRow.HEADER);
        final Row headerRow = tableSupport.getLastHeaderRow();
        commandCall.setElement(headerRow.getElement());
        commandCall.execute(evaluator, resultRecorder);

        // the rest is copied from Concordion's original implementation
        tableRow.set(TableRow.BODY);
        final Row[] detailRows = tableSupport.getDetailRows();
        for (final Row detailRow : detailRows) {
            if (detailRow.getCells().length != tableSupport.getColumnCount()) {
                throw new RuntimeException("The <table> 'execute' command only supports rows with an equal number of columns.");
            }
            commandCall.setElement(detailRow.getElement());
            tableSupport.copyCommandCallsTo(detailRow);
            commandCall.execute(evaluator, resultRecorder);
        }
        tableRow.set(null);
    }
View Full Code Here


        }
    }

    private void executeTable(final CommandCall commandCall, final Evaluator evaluator,
        final ResultRecorder resultRecorder) {
        final TableSupport tableSupport = new TableSupport(commandCall);

        // this is the bit that's different: also execute on the header
        tableRow.set(TableRow.HEADER);
        final Row headerRow = tableSupport.getLastHeaderRow();
        commandCall.setElement(headerRow.getElement());
        commandCall.execute(evaluator, resultRecorder);

        // the rest is copied from Concordion's original implementation
        tableRow.set(TableRow.BODY);
        final Row[] detailRows = tableSupport.getDetailRows();
        for (final Row detailRow : detailRows) {
            if (detailRow.getCells().length != tableSupport.getColumnCount()) {
                throw new RuntimeException(
                    "The <table> 'execute' command only supports rows with an equal number of columns.");
            }
            commandCall.setElement(detailRow.getElement());
            tableSupport.copyCommandCallsTo(detailRow);
            commandCall.execute(evaluator, resultRecorder);
        }
        tableRow.set(null);
    }
View Full Code Here

TOP

Related Classes of org.concordion.internal.TableSupport

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.