@Override protected void initServletContext(ServletContext servletContext) { String name = delegate.getClass().getName(); getApplicationContext().getAutowireCapableBeanFactory().initializeBean(delegate, name); }
/** * Returns the adjusted view name as determined by subclass implementation. * In the case where a requested URL is prefixed with "redirect:" or * "forward:", the view name will not be adjusted. * @param viewName the name of the view before device resolution * @return the adjusted view name * @see #getDeviceViewNameInternal(String) */ protected String getDeviceViewName(String viewName) { // Check for special "redirect:" prefix. if (viewName.startsWith(REDIRECT_URL_PREFIX)) { return viewName; } // Check for special "forward:" prefix. if (viewName.startsWith(FORWARD_URL_PREFIX)) { return viewName; } return getDeviceViewNameInternal(viewName); }
public View resolveViewName(String viewName, Locale locale) throws Exception { String deviceViewName = getDeviceViewName(viewName); View view = delegate.resolveViewName(deviceViewName, locale); if (enableFallback && view == null) { view = delegate.resolveViewName(viewName, locale); } if (logger.isDebugEnabled() && view != null) { logger.debug("Resolved View: " + view.toString()); } return view; }
public View resolveViewName(String viewName, Locale locale) throws Exception { String deviceViewName = getDeviceViewName(viewName); View view = delegate.resolveViewName(deviceViewName, locale); if (enableFallback && view == null) { view = delegate.resolveViewName(viewName, locale); } if (logger.isDebugEnabled() && view != null) { logger.debug("Resolved View: " + view.toString()); } return view; }
@Override protected void initServletContext(ServletContext servletContext) { String name = delegate.getClass().getName(); getApplicationContext().getAutowireCapableBeanFactory().initializeBean(delegate, name); }
/** * Returns the adjusted view name as determined by subclass implementation. * In the case where a requested URL is prefixed with "redirect:" or * "forward:", the view name will not be adjusted. * @param viewName the name of the view before device resolution * @return the adjusted view name * @see #getDeviceViewNameInternal(String) */ protected String getDeviceViewName(String viewName) { // Check for special "redirect:" prefix. if (viewName.startsWith(REDIRECT_URL_PREFIX)) { return viewName; } // Check for special "forward:" prefix. if (viewName.startsWith(FORWARD_URL_PREFIX)) { return viewName; } return getDeviceViewNameInternal(viewName); }