Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
5.0.11
-
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.