类 VelocityLayoutViewResolver

    • 方法详细资料

      • setLayoutKey

        public void setLayoutKey​(String layoutKey)
        已过时。
        Set the context key used to specify an alternate layout to be used instead of the default layout. Screen content templates can override the layout template that they wish to be wrapped with by setting this value in the template, for example:
        #set($layout = "MyLayout.vm" )

        The default key is "layout", as illustrated above.

        参数:
        layoutKey - the name of the key you wish to use in your screen content templates to override the layout template
        另请参阅:
        VelocityLayoutView.setLayoutKey(java.lang.String)
      • setScreenContentKey

        public void setScreenContentKey​(String screenContentKey)
        已过时。
        Set the name of the context key that will hold the content of the screen within the layout template. This key must be present in the layout template for the current screen to be rendered.

        Default is "screen_content": accessed in VTL as $screen_content.

        参数:
        screenContentKey - the name of the screen content key to use
        另请参阅:
        VelocityLayoutView.setScreenContentKey(java.lang.String)
      • buildView

        protected AbstractUrlBasedView buildView​(String viewName)
                                          throws Exception
        已过时。
        从类复制的说明: UrlBasedViewResolver
        Creates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances.

        Spring lifecycle methods as defined by the bean container do not have to be called here; those will be applied by the loadView method after this method returns.

        Subclasses will typically call super.buildView(viewName) first, before setting further properties themselves. loadView will then apply Spring lifecycle methods at the end of this process.

        覆盖:
        buildView 在类中 VelocityViewResolver
        参数:
        viewName - the name of the view to build
        返回:
        the View instance
        抛出:
        Exception - if the view couldn't be resolved
        另请参阅:
        UrlBasedViewResolver.loadView(String, java.util.Locale)