SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 155 | Next

Alexander Kolesnikov

"Tapestry 5: Building Web Applications"

Every Tapestry application can
have a number of message catalogs. One of them is the root message catalog that
can be used by all the pages and components of the application. It is implemented
as an ordinary text file with a .properties extension, stored inside of the WEB-INF
directory. The file should contain key-value pairs for each property separated by the
= character, like this:
key1=value1
key2=value2
key3=value3
When a Messages object is injected into a page, this object contains all key-value
pairs available for the given page, including those defined in the root message
catalog. So what we need to do now is to provide such a root message catalog.
Tapestry will use it to define which labels to display for every option in the
enumeration. One of the benefits of this is that we can give the properties files to
our clients, and they will be able to define how different labels should be displayed
without ever touching the source code.
The important thing to remember is that the name of the root message catalog is not
arbitrary. It should match the name of the application's Tapestry filter as defined in
its deployment descriptor (web.xml) file.
Open the deployment descriptor of your application (it can be found directly under
WEB-INF directory) and view it as an XML code.


Pages:
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6