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

Strip out duplication of names in the class name -> page name / component type conversion

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0
    • 5.0.4
    • tapestry-core
    • None

    Description

      When Tapestry converts a class name into a page name, component type or mixin name, it could be a little smarter: when the package name is either the prefix or the suffix of the simple class name, it should be stripped off.

      Example: org.example.myapp.pages.book.EditBook --> book/edit (not book/editbook). Likewise, org.example.myapp.pages.book.BookIndex --> book/index.

      This does open up a little possibility for name collisions (what if class Index and class BookIndex are in the book package?).

      The alternative is to have many different classes with the same simple name (List, Edit, Index, etc.) in different packages, which is much harder to maintain.

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: