Reference Manual for Gracelets - 2.0.0.RC2SourceForge.net Logo
1.4 - Introduction : How it Works
Gracelets has hooks in the complete JSF Request Life Cycle and in the Facelets Compilation process. These hooks allow it to "intercept" only those parts of the process where it needs to intervene.

As was mentioned in the previous Concepts section, an important difference between a normal groovy script and a Gracelet script is that a Gracelet script is only ran ONCE during the entire application life cycle. That is because it is only responsable for building the view, just like normal XHTML Facelet source files.

When you write a file ending with the .groovy extension in certain places in your Web Application, it can be interpreted as a Gracelet script. Since Gracelet scripts can refer to different components of the Gracelet Framework, the following will show a quick list of these different components and what terms we will use to reference them going forward:
  • Gracelet Pages, Tags and Templates [term: view script]
  • Gracelet Component Libraries [term: gracelet library]
  • Gracelet Controllers [term: controllers]