Phone directory example

This application manages a list of names and phone numbers. It features a live Ajax search using the SearchPanel component supplemented by a custom category filter. Categories are stored in the database, and if there are none present on startup DirectoryApplication creates some itself.

The example uses an experimental Databinder feature: conversational Hibernate sessions. This model of interaction retains changes to persistent entities between requests before committing them to the database. Expectations for this kind of functionality arise more frequently in ajax-heavy applications, where units of work tend to happen in smaller bits across several requests.

In this case the user can make changes to any number of records in a Wicket modal window, and later has the option of reverting or saving all the changes at once. The approach, as qualified above, is experimental. It appears in this application as a demonstration and it is not recommended for one’s first real Databinder application.

Demonstration

Try this application and enter your own false phone number.

Source files

Projects for the reader

  1. Other fields (address…)
  2. Add and remove categories
Page last updated June 29, 2008. Produced with Databinder.