@Test public void resolveViewNameNormalDevicePrefixFallback() throws Exception { device.setDeviceType(DeviceType.NORMAL); request.setAttribute(DeviceUtils.CURRENT_DEVICE_ATTRIBUTE, device); viewResolver.setNormalPrefix("normal/"); viewResolver.setEnableFallback(true); expect(delegateViewResolver.resolveViewName("normal/" + viewName, locale)).andReturn(null); expect(delegateViewResolver.resolveViewName(viewName, locale)).andReturn(view); replay(delegateViewResolver, view); View result = viewResolver.resolveViewName(viewName, locale); assertSame("Invalid view", view, result); verify(delegateViewResolver, view); }
public void setNormalPrefix(String normalPrefix) { this.normalPrefix = (normalPrefix != null ? normalPrefix : ""); }
LiteDeviceDelegatingViewResolver extends AbstractDeviceDelegatingViewResolver { public void setNormalPrefix(String normalPrefix) { this.normalPrefix = (normalPrefix != null ? normalPrefix : ""); } }
LiteDeviceDelegatingViewResolver extends AbstractDeviceDelegatingViewResolver { public void setNormalPrefix(String normalPrefix) { this.normalPrefix = (normalPrefix != null ? normalPrefix : ""); } LiteDeviceDelegatingViewResolver(ViewResolver delegate); }
LiteDeviceDelegatingViewResolver extends AbstractDeviceDelegatingViewResolver { public void setNormalPrefix(String normalPrefix) { this.normalPrefix = (normalPrefix != null ? normalPrefix : ""); } LiteDeviceDelegatingViewResolver(ViewResolver delegate); void setNormalPrefix(String normalPrefix); void setMobilePrefix(String mobilePrefix); void setTabletPrefix(String tabletPrefix); void setNormalSuffix(String normalSuffix); void setMobileSuffix(String mobileSuffix); void setTabletSuffix(String tabletSuffix); }
LiteDeviceDelegatingViewResolver extends AbstractDeviceDelegatingViewResolver { public void setNormalPrefix(String normalPrefix) { this.normalPrefix = (normalPrefix != null ? normalPrefix : ""); } LiteDeviceDelegatingViewResolver(ViewResolver delegate); void setNormalPrefix(String normalPrefix); void setMobilePrefix(String mobilePrefix); void setTabletPrefix(String tabletPrefix); void setNormalSuffix(String normalSuffix); void setMobileSuffix(String mobileSuffix); void setTabletSuffix(String tabletSuffix);  }