nz.co.senanque.vaadin.RequestWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of madura-vaadin Show documentation
Show all versions of madura-vaadin Show documentation
Integrates Madura Objects with Vaadin applications including support for dynamic metadata changes (available choices, read/write status of fields etc).
package nz.co.senanque.vaadin;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinService;
/**
* @author Roger Parkinson
*
*/
public class RequestWrapper {
public static boolean isMobile() {
VaadinRequest vaadinRequest = VaadinService.getCurrentRequest();
boolean mobileUserAgent = vaadinRequest.getHeader("user-agent")
.toLowerCase().contains("mobile");
return mobileUserAgent;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy