Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-2312

Simplify addition of columns to Grid

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 5.0.11
    • None
    • Core Components
    • None

    Description

      To add an artificial column to Grid one have to do a lot of work. Tapestry could be smarter by creation of BeanModel.
      A parameter whose name could not be matched to an existing property should be added automatically.

      <t:grid source="users" row="user" model="model">
      <t:parameter name="deleteCell">.....</t:parameter>
      </t:grid>

      public class Start {
      ...
      @Inject
      private BeanModelSource beanModelSource;

      @Inject
      private ComponentResources resources;

      public BeanModel getModel()

      { BeanModel model = beanModelSource.create(User.class, false, resources); model.add("delete", null); return model; }

      }

      In this case the following class can be reduced to:

      public class Start {
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            igor.drobiazko Igor Drobiazko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: