Home arrow Apache arrow Page 5 - PropertySelection and IPropertySelectionModel in Apache Tapestry

So what have we done? - Apache

We already encountered PropertySelection in one of the previous articles so we know that it is a Tapestry component used to display a drop-down list, allowing the user to choose one of multiple options. You might think that the way in which options are provided to this component (through its model binding) is somewhat cumbersome when all you need to do is select one of a few strings. However, PropertySelection was designed with a great deal of power and flexibility in mind, and I hope that today you will appreciate this.

  1. PropertySelection and IPropertySelectionModel in Apache Tapestry
  2. Configuring PropertySelection
  3. Working on the Model
  4. One More Detail
  5. So what have we done?
By: Alexander Kolesnikov
Rating: starstarstarstarstar / 24
June 12, 2007

print this article



To summarize, after we have created a model (an implementation of IPropertySelectionModel), working with drop-down lists in a Tapestry application becomes very simple. All we need to display the appropriate options is to provide the created model to a PropertySelection component through its model binding.

And in order to put the result of the user's selection into a page property or even straight into an ASO stored in the session, all we need to do is provide the familiar value binding. There is no code to write at all, even if the selection covers a very complicated object, perhaps retrieved from a database. All the code is written just once and encapsulated into the model; it then can be reused numerous times across multiple applications.

Writing an implementation of IPropertySelectionModel isn't a big deal either. We just need to remember which question each of its five methods answers and provide an appropriate answer.

What comes next?

My initial plan for the next issue was to start a new big topic, namely custom components development. However, I have suddenly realized that there is another Tapestry component which resembles PropertySelection; that one is named Autocompleter. It is also one of the AJAX-enabled components that come with Tapestry 4.1, and I know that many of you are waiting impatiently for something about AJAX.

So in the next article we are going to touch on the AJAX side of Tapestry and maybe, if space will allow, cover one of the minor outstanding topics that has accumulated over time. And then, in the article after the next, we'll unleash our creativity developing custom components.

Until the next article then.

>>> More Apache Articles          >>> More By Alexander Kolesnikov

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Apache Unveils Cassandra 1.2
- Apache on ARM Chips? Dell and Calxeda Help M...
- The Down Side of Open Source Software
- VMware Unveils Serengeti for Apache Hadoop
- SAP Takes Steps to Improve Hadoop Integration
- Looking to Hone Apache Hadoop Skills?
- How to Install Joomla on WAMPP
- Working with XAMPP and Wordpress
- GUI Available for Apache Camel
- Reduce Server Load for Apache and PHP Websit...
- Creating a VAMP (Vista, Apache, MySQL, PHP) ...
- Putting Apache in Jail
- Containing Intrusions in Apache
- Server Limits for Apache Security
- Setting Permissions in Apache

Developer Shed Affiliates


Dev Shed Tutorial Topics: