,ch14.9433  Page 454  Monday, February 14, 2005  12:55 PM
Example 14 9. Overriding a definition for a specific locale (continued)
    
This technique is useful for localizing the layout. For some locales, you may want to
reorient the sidebars so the predominant sidebar is on the right instead of the left.
Tiles localization solves this problem.
See Also
Development of an internationalized application takes planning and forethought.
Chapter 12 addresses a number of problems that you may run into when localizing a
Struts application.
14.6 Using Tiles in a Modular Application
Problem
You are using Struts modules, and you want to define module specific Tiles definitions.
Solution
Create a separate Tiles definitions file for each module. Then, in each module's
Struts configuration file, configure the
TilesPlugin
, as shown in Example 14 10, to
use that module's definitions file and be module aware.
Example 14 10. Configuring Tiles for a specific module
    
    
                     value="/WEB INF/tiles defs module1.xml" />
    
    
Discussion
Like configuration files for the Struts Validator, you can separate your Tiles defini 
tions into multiple files. If you are using modules, you can create Tiles definitions,
which can only be accessed from within a specific module, by declaring that defini 
tion file in the module's Struts configuration file. To ensure that Tiles handles module 
relative paths when it processes requests, you must set the
moduleAware
property to
true
. By being module aware when you forward to a definition, the definition name
will be pulled from the definitions for that module. Definition names have to be
unique within a module.
454 | Chapter 14: Tiles and Other Presentation Approaches
This is the Title of the Book, eMatter Edition
Copyright   2005 O'Reilly & Associates, Inc. All rights reserved.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

strutsweb hosting

 

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved