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

The InjectPageWorker should use the ComponentSource service, rather than the RequestPageCache

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 5.0.11
    • 5.0.12
    • tapestry-core
    • None

    Description

      Currently, it generates Javassist code like:

      add method: private com.parametrix.earth.pages.survey.SurveyDebug _$read_inject_page_nextPage()
      {
      org.apache.tapestry.internal.structure.Page page = _$requestPageCache.get("MyPage");
      return (com.examples.pages.MyPage) page.getRootElement().getComponent();
      }

      But the less runtime generated code, the better (minutely faster, and easier to debug), Using an injected ComponentSource, this would be more like:

      return (om.examples.pages.MyPage) _$componentSource.getPage("MyPage");

      Even in runtime generated code, Law of Demeter is still useful.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: