Closed KaRkY closed 12 years ago
You should update your "thymeleaf" and "thymeleaf-spring3" dependencies to version 2.0.11. Beta2 will require at least this version...
I alredy have and i looked at the spring3 code and setViewClass requires subclass of ThymeleafView.
Look at line 132: https://github.com/thymeleaf/thymeleaf-spring3/blob/2.0-master/src/main/java/org/thymeleaf/spring3/view/ThymeleafViewResolver.java
You are absolutely right. This is a bug in thymeleaf-spring3 2.0.11, because setViewClass should allow any implementation of AbstractThymeleafView instead of requiring ThymeleafView specifically.
I've added it here: https://github.com/thymeleaf/thymeleaf-spring3/issues/5
Solved in thymeleaf-spring3. Latest 2.0.12-SNAPSHOT includes this fix.
Thanks.
I am using spring configuration with latest beta2 SNAPSHOT and i get this exception:
Caused by: java.lang.IllegalArgumentException: Given view class [org.thymeleaf.extras.tiles2.spring.web.view.ThymeleafTilesView] is not of type [org.thymeleaf.spring3.view.ThymeleafView] at org.thymeleaf.spring3.view.ThymeleafViewResolver.setViewClass(ThymeleafViewResolver.java:133) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1154) ... 34 more
I am not shure if this is a problem in thymeleaf-extras-tiles2 or thymeleaf-spring3.