Tapestry
  1. Tapestry
  2. TAPESTRY-1931

Add an annotation to allow explicit setting of property types

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.6
    • Fix Version/s: 5.0.7
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Currently, there's a fairly simple mapping from Java property type to Tapestry property type ... the latter being a string used to select appropriate components to display the value of a property or edit the value of a property.

      However, type is not always enough. For example, String and Number both map to "text", but a String could also be a long text field (use a <textarea>) or perhaps a rich text field (we will eventually add a rich text editor to Tapestry). Likewise, Date maps to "date" but that doesn't allow for time input, just the date portion.

      How about:

      public class MyBean {
      private String _password;
      private String _note;

      public String getPassword()

      { return _password; }

      @PropertyType("password")
      public void setPassword(String password)

      { _password = password; }

      public String getNote()

      { return _note; }

      @PropertyType("longtext")
      public void setNote(String note)

      { _note = note); }

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development