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: bounce-39045291-70367...@lists.wisc.edu 
<bounce-39045291-70367...@lists.wisc.edu> on behalf of David Derderian 
<dmder...@oakland.edu>
Sent: Tuesday, January 6, 2015 3:43 PM
To: uportal-dev@lists.ja-sig.org
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 
<tim.lev...@wisc.edu<mailto:tim.lev...@wisc.edu>> 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
tim.lev...@wisc.edu<mailto:tim.lev...@wisc.edu>
MyUW-Infrastructure
https://calendar.wisc.edu/share/u/tim.lev...@wisc.edu/dr(-14,30)


--

You are currently subscribed to 
uportal-dev@lists.ja-sig.org<mailto:uportal-dev@lists.ja-sig.org> as: 
dmder...@oakland.edu<mailto:dmder...@oakland.edu>
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev


--

You are currently subscribed to uportal-dev@lists.ja-sig.org as: 
tim.lev...@wisc.edu
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

-- 
You are currently subscribed to uportal-dev@lists.ja-sig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to