On Thu, 19 Aug 2010 15:41:20 -0300, Rich M <rich...@moremagic.com> wrote:

a) ModuleIndex functions similar to the Layout page, it must contain the navigation menu and then directs content from a specific page of the Module (I will call these SubPages) into the template.

What do you mean by "directs content"?

b) The module needs to keep track of all the SubPage instances so it can wipe their persistent fields when navigation changes.

This can be implemented as a ComponentRequestFilter. In addition, Tapestry 5.2 adds one page lifecycle that my be useful this kind of situation: http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/annotations/PageReset.html

c) The module needs to assess the target of page navigation, and then filter the resulting SubPage based on user permissions within the application.

This can be implemented as a ComponentRequestFilter. That's the recommended way of doing it.

d) When one of the specific SubPage classes is changed in source, it should be able to be live reloaded without restarting the application

In Eclipse, I just leave all the projects (modules) open and it works, as long as I'm not using Maven's jetty:run. I usually create a Main class that launches a Jetty instance.

ModuleIndex has a @Component for each SubPage and then maps these components to the activation context integers in a @SessionState Map.

In Tapestry 5.1 (page pool), this would lead to a large memory comsumption. In 5.2 there's no such problem. Anyway, a good option is to use ComponentSource to get instances of components or pages in runtime instead of holding references to instances, leading to the ClassCastExceptios you're experiencing.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to