Tapestry
  1. Tapestry
  2. TAPESTRY-2342

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

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.12
    • Component/s: tapestry-core
    • Labels:
      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.

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development