-
Nov 29th, 2010, 02:38 PM
#1
InternalResourceViewResolver and mobile views
In Keith Donalds blog post about Spring Mobile (http://blog.springsource.com/2010/11...n-development/) I found this part interesting:
Finally, a Tiles-based page layout that changes if the device is a mobile device:
<definition name="page" templateExpression="/WEB-INF/layouts/${currentDevice.mobile ? 'mobile/' : 'standard/'}page.jsp" />
I like to do something similar with a InternalResourceViewResolver in my mvc config xml.
<bean class="org.springframework.web.servlet.view.Intern alResourceViewResolver" prefix="/WEB-INF/views/" p:suffix=".jsp" />
This because I'm not using Tiles but plain JSP's (decorated using SiteMesh).
Can I use the expression like ${currentDevice.mobile ? 'mobile/' : 'standard/'} also in combination with a InternalResourceViewResolver.
Bases on the currentDevice.mobile I want to render
index.jsp (for desktop) or index.iphone.jsp or perhaps index.android.jsp.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules