Tapestry
  1. Tapestry
  2. TAPESTRY-1491

No way to get the logical page name for a page instance

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.5
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      There is no way to get the logical name of page from a page instance. This is something that belongs in ComponentResources.

      It is needed because ComponentSource.getPage(String) takes the logical page name, but there's no way to generate that name in code; you can "guess" using getClass().getSimpleName() but that's not accurate for page classes in a sub-package.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        It's now available via the inject ComponentResources, as method getPageName().

        In addition, converted a number of internal services to use the logical page name (in a canonical form) to identify the page, rather than the fully qualified class name. This should be more readable in a number of ways, since the class name is only really needed when first instantiating the page. It cuts down, in a minor way, the amount of data serialized inside forms, and shortens some of the toString() output for components & etc.

        Show
        Howard M. Lewis Ship added a comment - It's now available via the inject ComponentResources, as method getPageName(). In addition, converted a number of internal services to use the logical page name (in a canonical form) to identify the page, rather than the fully qualified class name. This should be more readable in a number of ways, since the class name is only really needed when first instantiating the page. It cuts down, in a minor way, the amount of data serialized inside forms, and shortens some of the toString() output for components & etc.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development