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.
Advanced Components
[ 134 ]
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 with its help many different kinds of objects. However,
one scenario can still raise a problem.
Add an output statement to the getAllCelebrities method in the ShowAll page
class, like this:
public List
getAllCelebrities()
{
System.out.println("Getting all celebrities...");
return dataSource.getAllCelebrities();
}
The purpose of this is simply to be aware when the method is called. Run the
application, log in, and as soon as the table with celebrities is shown, you will see the
output, as follows:
Getting all celebrities.
Pages:
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181