Package com.liferay.faces.util.client

Examples of com.liferay.faces.util.client.BrowserSnifferFactory


  @Override
  protected String[] getModules(FacesContext facesContext, UIComponent uiComponent) {

    String[] modules = super.getModules(facesContext, uiComponent);
    BrowserSnifferFactory browserSnifferFactory = (BrowserSnifferFactory) FactoryExtensionFinder.getFactory(
        BrowserSnifferFactory.class);
    BrowserSniffer browserSniffer = browserSnifferFactory.getBrowserSniffer(facesContext.getExternalContext());
    InputDate inputDate = (InputDate) uiComponent;
    boolean responsive = inputDate.isResponsive();

    if (browserSniffer.isMobile() && responsive) {
      String nativeAlloyModuleName = modules[0].concat("-native");
View Full Code Here


  @Override
  protected String getPattern() {

    FacesContext facesContext = FacesContext.getCurrentInstance();

    BrowserSnifferFactory browserSnifferFactory = (BrowserSnifferFactory) FactoryExtensionFinder.getFactory(
        BrowserSnifferFactory.class);
    BrowserSniffer browserSniffer = browserSnifferFactory.getBrowserSniffer(facesContext.getExternalContext());

    if (browserSniffer.isMobile() && isResponsive()) {
      return DEFAULT_HTML5_TIME_PATTERN;
    }
    else {
View Full Code Here

      clientKey = clientVarName;
    }

    ResponseWriter responseWriter = facesContext.getResponseWriter();

    BrowserSnifferFactory browserSnifferFactory = (BrowserSnifferFactory) FactoryExtensionFinder.getFactory(
        BrowserSnifferFactory.class);
    BrowserSniffer browserSniffer = browserSnifferFactory.getBrowserSniffer(facesContext.getExternalContext());

    if (browserSniffer.isMobile() && inputTime.isResponsive()) {

      JavaScriptFragment liferayComponent = new JavaScriptFragment("Liferay.component('" + clientKey + "')");
      String clientId = uiComponent.getClientId(facesContext);
View Full Code Here

  @Override
  protected void encodeHiddenAttributes(FacesContext facesContext, ResponseWriter responseWriter, InputTime inputTime,
    boolean first) throws IOException {

    BrowserSnifferFactory browserSnifferFactory = (BrowserSnifferFactory) FactoryExtensionFinder.getFactory(
        BrowserSnifferFactory.class);
    BrowserSniffer browserSniffer = browserSnifferFactory.getBrowserSniffer(facesContext.getExternalContext());

    if (!(browserSniffer.isMobile() && inputTime.isResponsive())) {

      encodeAutocomplete(facesContext, responseWriter, inputTime, first);
      first = false;
View Full Code Here

  @Override
  public String getAlloyClassName(FacesContext facesContext, UIComponent uiComponent) {

    String alloyClassName = super.getAlloyClassName(facesContext, uiComponent);
    BrowserSnifferFactory browserSnifferFactory = (BrowserSnifferFactory) FactoryExtensionFinder.getFactory(
        BrowserSnifferFactory.class);
    BrowserSniffer browserSniffer = browserSnifferFactory.getBrowserSniffer(facesContext.getExternalContext());
    InputTime inputTime = (InputTime) uiComponent;

    if (browserSniffer.isMobile() && inputTime.isResponsive()) {
      alloyClassName = alloyClassName.concat("Native");
    }
View Full Code Here

  @Override
  protected String[] getModules(FacesContext facesContext, UIComponent uiComponent) {

    List<String> modules = new ArrayList<String>();
    String[] oldModules = super.getModules(facesContext, uiComponent);
    BrowserSnifferFactory browserSnifferFactory = (BrowserSnifferFactory) FactoryExtensionFinder.getFactory(
        BrowserSnifferFactory.class);
    BrowserSniffer browserSniffer = browserSnifferFactory.getBrowserSniffer(facesContext.getExternalContext());
    InputTime inputTime = (InputTime) uiComponent;
    boolean responsive = inputTime.isResponsive();

    if (browserSniffer.isMobile() && responsive) {
      String nativeAlloyModuleName = oldModules[0].concat("-native");
View Full Code Here

TOP

Related Classes of com.liferay.faces.util.client.BrowserSnifferFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.