Changes between Version 2 and Version 3 of HowTos/HowToUseDynamicViewMappings

Show
Ignore:
Timestamp:
11/16/09 23:06:05 (16 years ago)
Author:
cfgrok (IP: 64.30.223.5)
Comment:

Added header & escaped wiki page names

Legend:

Unmodified
Added
Removed
Modified
  • HowTos/HowToUseDynamicViewMappings

    v2 v3  
     1= Dynamic View Mappings = 
     2 
    13MG3 is designed to support cases where many customers are running "their own instance" of a common code base and how to support per-customer modification. 
    24 
    35Realizing the use case, let's imagine that you host a blog platform.  Customers can sign up and immediately have their own blog deployed.  Each blog is running the exact same code base, all hosted on the same server/cluster.  
    46 
    5 Inevitably, a customer will offer to pony up cash to have a view things change. On the service / controller side, MG3 has you covered by allowing ColdSpring-based definition of services and controllers, allowing you to use ColdSpring "overriding" to one-off services and controllers. 
     7Inevitably, a customer will offer to pony up cash to have a view things change. On the service / controller side, MG3 has you covered by allowing !ColdSpring-based definition of services and controllers, allowing you to use !ColdSpring "overriding" to one-off services and controllers. 
    68 
    79For views, however, things were tricky.  To support this case, the concept of "dynamic viewMappings" is implemented. 
     
    2123A common use case is to give all clients a custom URL. As a request comes in to the application, your code can check the url and provide the right set of viewMappings for layering of custom pages and skins. All while keeping your core software free of such knowledge and customizations. 
    2224 
    23 As MG3 begins the view rendering process, it will look in your mappings (comma delimited list) provided in event.setValue("viewMappingAdvice", "/adobe/coldfusion,/adobe/flex") in canonical order. If the template value (say index.cfm) exists in the path /adobe/coldfusion, MG3 will use that. If not, but index.cfm exists in /adobe/flex, MG3, will use that. If neither exist, MG3 will look in the viewMappings provided in your modelglue.modelGlueConfiguration bean in ColdSpring.xml to find the correct view. 
     25As MG3 begins the view rendering process, it will look in your mappings (comma delimited list) provided in event.setValue("viewMappingAdvice", "/adobe/coldfusion,/adobe/flex") in canonical order. If the template value (say index.cfm) exists in the path /adobe/coldfusion, MG3 will use that. If not, but index.cfm exists in /adobe/flex, MG3, will use that. If neither exist, MG3 will look in the viewMappings provided in your modelglue.modelGlueConfiguration bean in !ColdSpring.xml to find the correct view. 
    2426 
    2527