responsive_renderkit_primefaces_mobile_consigli_da_smith

27 Mar

http://forum.primefaces.org/viewtopic.php?f=3&t=16328

 

 http://forum.primefaces.org/viewtopic.php?f=8&t=19887


 

filter fpr detect device and redirect to mobile pages

 

http://forum.primefaces.org/viewtopic.php?f=8&t=35657

replace the following:

1. viewhandler
2. @sessionscoped @postconstruct

with the following:

servlet/http filter that uses

HttpServletRequest req = (HttpServletRequest) context.getExternalContext().getRequest();
String userAgent = req.getHeader("user-agent");
String accept = req.getHeader("Accept");

if (userAgent != null && accept != null) {
UserAgentInfo agent = new UserAgentInfo(userAgent, accept);
if (agent.isMobileDevice()) {
return “PRIMEFACES_MOBILE”;
}
}

 

and

FacesContext.getCurrentInstance().getExternalContext().redirect("indexmobile.xhtml");

 


 

read the following

http://forum.primefaces.org/viewtopic.php?f=8&t=35657

 

and read that entire
blog post?

http://blog.primefaces.org/?p=3063

> a for desktop version
> a for mobile version
>
> and how you detect the device and user agent for forward at specific
> version of web jsf application ( desktop or mobile version) ?
>

searching google for

site:forum.primefaces.org mobile device
site:forum.primefaces.org mobile desktop

I found the following:

Mobile Device
http://forum.primefaces.org/viewtopic.php?f=8&t=19887

Desktop/mobile application problem
http://forum.primefaces.org/viewtopic.php?f=8&t=35657

read those [entire] forum topics

————-

 

http://www.hand-interactive.com/resources/detect-mobile-java.htm

http://stackoverflow.com/questions/15346006/detect-mobile-devices-from-user-agent-string

http://code.google.com/p/mobileesp/source/browse/Java/UAgentInfo.java 

 

Standard way to detect mobile browsers in a web application based on the http request

http://stackoverflow.com/questions/15346006/detect-mobile-devices-from-user-agent-string

http://stackoverflow.com/questions/142273/standard-way-to-detect-mobile-browsers-in-a-web-application-based-on-the-http-re

 

————

http://blog.mobileesp.com/
 
—————————-

vedere 3 modi di impostare il renderkit a primefacesmobile

 
http://forum.primefaces.org/viewtopic.php?f=3&t=16328
 
 
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: