Unlike scripting systems (such as JavaServer Pages and the like), Tapestry applications are gifted with a huge amount of information about how they are implemented. The same component object model that allows Tapestry to perform so many ordinary functions can be leveraged to provide some unusual functionality.
Run the Border tutorial from the previous chapter and click on the show inspector button (the gear icon in the lower right corner). A new window will launch, containing the Inspector:
The Inspector displays live information from the running application; in fact, it is simply another part of the application (the drop-down list of pages will include the Inspector page itself). The Inspector is most often used to debug HTML generation by viewing the HTML templates. It is also very useful in debugging problems where the wrong data is displayed, since it allows the developer to navigate to the particular components and see directly what properties are used.
The inspector allows the user to navigate to any page and any component on a page. The drop down list in the upper left corner lists all pages in the application; changing the selection immediately updates the Inspector.
Next to the drop down list is the component path; a list of nested component ids, starting with "page" to represent the page. Clicking on any id in the path changes the information displayed below.
Underneath the component navigation tools are a set of tab buttons for the different inspector views.