You're asking to preload all the pages in the app, to check for syntax errors in the html and page specs. Things the compiler doesn't catch, that normally you wouldn't discover until you visit the page. I used to do that. It's not supported directly by Tapestry, but in Tapestry3 it wasn't too bad. The gist of it was:

   Set pageNameSet = requestCycle.getRequestContext().getServlet()
             .getServletConfig().getServletContext()
             .getResourcePaths("/WEB-INF/");

Then each page could be loaded with cycle.getPage(pageName). It felt like sort of a hack, though... I had to do it at a point after startup where I could get a requestCycle; I did it in the first login.

In Tap4 it was a little harder to get to the servletContext. I believe it can be obtained from an injected instance of ApplicationGlobals but I didn't pursue that technique. I removed the feature because it slowed down development (all the pages had to be loaded after every restart, when normally you're editing only one or two), and it didn't catch any surprising errors after we got past the flurry of the initial release. It felt like more trouble than it was worth.



Patrick Moore wrote:
Is there a way to have Tapestry walk the component/page packages and generate
the .class files?

I would like to do this to make sure that in production there are no errors at
the basic component/page definition level.

Otherwise it seems like I am force to have a script that walks every
page/component just to get the byte code generated.

I don't know if there is a mvn plugin that will do this for me but if there is
please let me know.

-Pat

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to