Specify the prefix for the different device types. Default prefixes are empty strings. For the requested view name of "home", the following table illustrates how the view name will be adjusted based on device type.
Resolved Device | Method | Prefix | Adjusted View |
Normal | {@link #setNormalPrefix(String)} | "normal/" | "normal/home" |
Mobile | {@link #setMobilePrefix(String)} | "mobile/" | "mobile/home" |
Tablet | {@link #setTabletPrefix(String)} | "tablet/" | "tablet/home" |
Alternatively, you may want to have the views adjusted to use a suffix for each device type. Again, using the requested view name of "home", the following table shows the adjusted view names.
Resolved Device | Method | Suffix | Adjusted View |
Normal | {@link #setNormalSuffix(String)} | ".normal" | "home.normal" |
Mobile | {@link #setMobileSuffix(String)} | ".mobile" | "home.mobile" |
Tablet | {@link #setTabletSuffix(String)} | ".tablet" | "home.tablet" |
It is also possible to use a combination of prefix and suffix. The view resolver will apply both to the adjusted view.
@author Scott Rossillo @author Roy Clarkson @since 1.1 @see ViewResolver @see ContentNegotiatingViewResolver
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|