Column titles are currently generated by Tapestry automatically. What if we want to have different titles? Say we want to have the title, Birth Date, instead of Date Of Birth.
The easiest and the most efficient way to do this is to use the message catalog, the same one that we used while working with the Select
component in the previous chapter. Add the following line to the app.properties
file:
dateOfBirth-label=Birth Date
Run the application, and you will see that the column title has changed appropriately. This way, appending -label
to the name of the property displayed by the column, you can create the key for a message catalog entry, and thus change the title of any column.
Note
Right now, we are using the root message catalog, which is common for all the pages of the application. Later, in Chapter 7, you will see how to create a message catalog for every page.
Now you should be able to adjust the Grid
component to most of the possible requirements and to display...