We would want the desktop view if they were on a desktop. However, since respondr is also used for mobile, if on a mobile phone/tablet we would want them to see the mobile view of that portlet.
The best solution would be to have a portlet that is responsive like the framework, but just trying to have a middle step due to resource constraints. I may do the userAgent thing in the mean time. Thanks for the suggestion.? Tim Levett tim.levettATwisc.edu MyUW-Infrastructure ________________________________ From: [email protected] <[email protected]> on behalf of David Derderian <[email protected]> Sent: Tuesday, January 6, 2015 3:43 PM To: [email protected] Subject: Re: [uportal-dev] portlet-utils isMobile with respondr My horrible suggestion is you can check the requests' user-agent and determine (on a per portlet basis) what to do w/ specific user agents String userAgent = request.getProperty("user-agent"); However now you have to do this with every portlet. One of the more uglier solutions. If you're using Respondr wouldn't you want the default (or in this case "desktop") view anyway? On Tue, Jan 6, 2015 at 3:44 PM, Tim Levett <[email protected]<mailto:[email protected]>> wrote: Hi Devs, We came across an interesting problem and I'm curious if anyone else has had this issue. We are using the portlet-utils project in the CoursesPortlet and we use the method https://github.com/Jasig/portlet-utils/blob/master/portlet-mvc-util/src/main/java/org/jasig/portlet/utils/mvc/ThemeNameViewSelectorImpl.java#L30 a lot to decide to show mobile based portlets. This uses themes to determine mobile or not. Now that we are on respondr which is used for mobile and desktop it is always showing desktop. Really we should do something like the Spring.io project https://spring.io/guides/gs/device-detection/ but that doesn't seem to play nice with portlets. Does anyone have an alternative method/example to figure out mobile or desktop on the server side with portlets? ?Thanks in advance. Happy new year! Tim Levett [email protected]<mailto:[email protected]> MyUW-Infrastructure https://calendar.wisc.edu/share/u/[email protected]/dr(-14,30) -- You are currently subscribed to [email protected]<mailto:[email protected]> as: [email protected]<mailto:[email protected]> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/uportal-dev
