The DatePicker and Shell Components of Apache Tapestry - To cache or not to cache? (
Page 4 of 4 )
In an earlier article I've advised you to disable caching page templates and page specifications by Tapestry, so you can immediately see any changes you have made to these files. However, soon after that a Tapestry developer emailed me to point out that disabling caching is not a good idea. You can read his message in full at the discussion page for that article.
I do agree that it is not a good idea to disable caching when working on a big complicated project, but I am tempted to think that it is still acceptable for our simple projects. On the other hand, it is better to set everything up properly from the very beginning, so we need an alternative solution. How do we reload page templates and specifications without disabling caching?
In my current project I avoid this issue by using a Maven script that rebuilds and redeploys the whole project when I need to test it. While the script works, I can take a breather, which is okay for me, but can madden some of the more impatient folks. Another option is to reload the project in Tomcat's Application Manager. You can find a detailed description of how to do this in the first free chapter of the book by Kent Tong (a link to it is given in the first article of this series).
However, NetBeans offers yet another option, and it has worked well for me so far. As soon as you've made a change to a page template or specification, right-click on the project in the Projects view and select Clean and Build Project. Or maybe just Clean Project will do the same thing. When you run the project after such a cleanup, everything is deployed anew, and you can see all your changes.
I am still quite new to NetBeans (but I like this IDE), so suggestions from NetBeans gurus are welcome.
What comes next
In the next issue we are going to look into the details of how the PropertySelection component works and why IPropertySelectionModel is a powerful and flexible solution for providing options to a drop-down list.
See you in the next issue.
| | Discuss The DatePicker and Shell Components of Apache Tapestry | | | | | | | In this article I am doing several things at once: showing how to work with two... | | | | | | WOW- Great tutorials! More on the way? | | | | | | Yes, there should be soon published a tutorial on PropertySelection (Tapestry's... | | | | | | hi alex, u promised weekly tutorials, but i guess u were caught up in work that i... | | | | | | Thank you for your kind response!
The reality is that DevShed got caught up in... | | | | | | Hi Alexander,
On the Memorial Day week, as on most holidays, we usually have a... | | | | | | Yeah, I know, Charles, we need to be philosophical, but that's so difficult when you... | | | | | | I have found your tutorials super helpful in learning tapestry but I have hit a road... | | | | | | Yes, the problem is that I assumed that the readers have the source code available,... | | | | | | Will your examples work with Tapestry 5.0.6 -- I want to reiterate how happy I am... | | | | | | >>> Post your comment now! | | | | | |
|