Tapestry
  1. Tapestry
  2. TAPESTRY-1661

Specless component html template needs a package based resolution strategy

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      any

      Description

      When creating a specless component the html templates won't be resolved unless they are relative to the classpath location of the component class. It should be easy enough to take the class package string and break it up and search the context path using that as a last resort.

        Activity

        Hide
        Jim Roycroft added a comment -

        Thanks Jesse. This helps clean up my component class files a lot. Now I don't have to use this ugly hack in them anymore!

        <hack>
        @Asset("context:/somepage.html")
        public abstract IAsset get$template();
        </hack>

        Show
        Jim Roycroft added a comment - Thanks Jesse. This helps clean up my component class files a lot. Now I don't have to use this ugly hack in them anymore! <hack> @Asset("context:/somepage.html") public abstract IAsset get$template(); </hack>
        Hide
        Jim Roycroft added a comment -

        Actually, I jumped the gun a bit here... it does work for templates in the context root, but not for ones in subfolders within the context root. Still helps though.

        I guess subfolders would be tricky due to the lack of namespacing (that I know of), so the searching code would not know which template to use first if the names were identical.

        Show
        Jim Roycroft added a comment - Actually, I jumped the gun a bit here... it does work for templates in the context root, but not for ones in subfolders within the context root. Still helps though. I guess subfolders would be tricky due to the lack of namespacing (that I know of), so the searching code would not know which template to use first if the names were identical.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Jesse Kuhnert
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development