Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: Framework
    • Labels:
      None

      Description

      Sometimes it's useful to bind a list of JavaBeans to a PropertySelect, and have Tapestry display a property (labelProperty), and use another property as the selected value (valueProperty). That would allow us to include database lists (probably instantiated using Hibernate or some other ORM) directly on the page, as model for the SELECT.

      A simple implementation would go like this:

      public class BeanPropertySelectionModel<E> implements IPropertySelectionModel {
      public BeanPropertySelectionModel(List<E> options, String labelProperty, String valueProperty);

      public String getLabel(int index);

      public E getOption(int index);
      }

        Activity

        Leonardo Quijano Vincenzi created issue -
        Hide
        Leonardo Quijano Vincenzi added a comment -

        Implementation of the model object.

        Show
        Leonardo Quijano Vincenzi added a comment - Implementation of the model object.
        Leonardo Quijano Vincenzi made changes -
        Field Original Value New Value
        Attachment BeanPropertySelectionModel.java.patch [ 12312715 ]
        Hide
        Andreas Andreou added a comment -

        There's a similar BeanPropertySelectionModel in org.apache.tapestry.form

        Show
        Andreas Andreou added a comment - There's a similar BeanPropertySelectionModel in org.apache.tapestry.form
        Andreas Andreou made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.1 [ 12310632 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12324596 ] Default workflow, editable Closed status [ 12567469 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12567469 ] jira [ 12590449 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Leonardo Quijano Vincenzi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development