[uportal-dev] portlet-utils isMobile with respondr

2015-01-06 Thread Tim Levett
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
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 as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Re: [uportal-dev] portlet-utils isMobile with respondr

2015-01-06 Thread David Derderian
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 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
 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 as: 
 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: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev