Package org.apache.tapestry.contrib.table.model.ognl

Examples of org.apache.tapestry.contrib.table.model.ognl.ExpressionTableColumnModel


    // This is a simple to use column model that uses OGNL to access
    // the data to be displayed in each column. The first string is
    // the name of the column, and the second is the OGNL expression.
    // We also enable sorting for all columns by setting the second argument to true
    ITableColumnModel objColumnModel =
      new ExpressionTableColumnModel(
        new String[] {
                    "Locale", "toString()",
          "Language", "displayLanguage",
          "Country", "displayCountry",
          "Variant", "displayVariant",
                    "ISO Language", "ISO3Language",
                    "ISO Country", "ISO3Country",
                    },
        true);


        // Modify the columns to render headers designed for use in a form.
        // These headers ensure that the form is submitted when clicking on them
        // and sorting by the column so that current form selections are preserved.
        // Skip this if the table is not used in a form or you do not need
        // that behaviour. 
        // This is usually used in conjunction with the TableFormPages and
        // the TableFormRows components.
        ITableRendererSource objRendererSource = new SimpleTableColumnFormRendererSource();
        for (Iterator it = objColumnModel.getColumns(); it.hasNext(); ) {
            ExpressionTableColumn objColumn = (ExpressionTableColumn) it.next();
            objColumn.setColumnRendererSource(objRendererSource);
        }

View Full Code Here


        // Generate a simple sorting column model that uses OGNL to get the column data.
        // The columns are defined using pairs of strings.
        // The first string in the pair is the column name.
        // The second is an OGNL expression used to obtain the column value.
        ITableColumnModel objColumnModel =
            new ExpressionTableColumnModel(new String[] {
                "Locale", "toString()",
                "Language", "language",
                "Country", "country",
                "Variant", "variant",
                "ISO Language", "ISO3Language",
View Full Code Here

    // This is a simple to use column model that uses OGNL to access
    // the data to be displayed in each column. The first string is
    // the name of the column, and the second is the OGNL expression.
    // We also enable sorting for all columns by setting the second argument to true
    ITableColumnModel objColumnModel =
      new ExpressionTableColumnModel(
        new String[] {
                    "Locale", "toString()",
          "Language", "displayLanguage",
          "Country", "displayCountry",
          "Variant", "displayVariant",
View Full Code Here

TOP

Related Classes of org.apache.tapestry.contrib.table.model.ognl.ExpressionTableColumnModel

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.