Package org.apache.wicket.protocol.http

Examples of org.apache.wicket.protocol.http.ClientProperties


        }

        if (clientInfo instanceof WebClientInfo)
        {
          WebClientInfo info = (WebClientInfo)clientInfo;
          ClientProperties properties = info.getProperties();
          propertiesBean.merge(properties);
        }
        else
        {
          warnNotUsingWebClientInfo(clientInfo);
View Full Code Here


      getSession().setClientInfo(clientInfo);
    }
    else if (clientInfo instanceof WebClientInfo)
    {
      WebClientInfo info = (WebClientInfo)clientInfo;
      ClientProperties properties = info.getProperties();
      properties.setJavaEnabled(false);
    }
    else
    {
      warnNotUsingWebClientInfo(clientInfo);
    }
View Full Code Here

      }
      else
      {
        clientInfo = new WebClientInfo(requestCycle);
      }
      ClientProperties clientProperties = clientInfo.getProperties();
      if (clientProperties.isBrowserInternetExplorer() && clientProperties.getBrowserVersionMajor() < 9)
      {
        name = getVersion1();
      }

      requestCycle.setMetaData(KEY, name);
View Full Code Here

        }

        if (clientInfo instanceof WebClientInfo)
        {
          WebClientInfo info = (WebClientInfo)clientInfo;
          ClientProperties properties = info.getProperties();
          propertiesBean.merge(properties);
        }
        else
        {
          warnNotUsingWebClientInfo(clientInfo);
View Full Code Here

    String hostname = requestParameters.getParameterValue("hostname").toString("N/A");

    WebClientInfo clientInfo = new WebClientInfo(requestCycle);
    Session.get().setClientInfo(clientInfo);

    ClientProperties properties = clientInfo.getProperties();
    properties.setNavigatorAppCodeName(navigatorAppCodeName);
    properties.setNavigatorAppName(navigatorAppName);
    properties.setNavigatorAppVersion(navigatorAppVersion);
    properties.setCookiesEnabled(navigatorCookieEnabled);
    properties.setJavaEnabled(navigatorJavaEnabled);
    properties.setNavigatorLanguage(navigatorLanguage);
    properties.setNavigatorPlatform(navigatorPlatform);
    properties.setNavigatorUserAgent(navigatorUserAgent);
    properties.setScreenWidth(screenWidth);
    properties.setScreenHeight(screenHeight);
    properties.setScreenColorDepth(screenColorDepth);
    properties.setUtcOffset(utcOffset);
    properties.setUtcDSTOffset(utcDSTOffset);
    properties.setBrowserWidth(browserWidth);
    properties.setBrowserHeight(browserHeight);
    properties.setHostname(hostname);

    onClientInfo(target, clientInfo);
  }
View Full Code Here

    // the calls Session.getClientInfo.

    // don't use a property model here or anything else that is resolved
    // during rendering, as changing the request target during rendering
    // is not allowed.
    final ClientProperties properties = ((WebClientInfo)Session.get().getClientInfo()).getProperties();

    add(new MultiLineLabel("clientinfo", properties.toString()));

    IModel<String> clientTimeModel = new AbstractReadOnlyModel<String>()
    {
      /**
       * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
       */
      @Override
      public String getObject()
      {
        TimeZone timeZone = properties.getTimeZone();
        if (timeZone != null)
        {
          Calendar cal = Calendar.getInstance(timeZone);
          Locale locale = getLocale();
          DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.LONG, locale);
View Full Code Here

        }

        if (clientInfo instanceof WebClientInfo)
        {
          WebClientInfo info = (WebClientInfo)clientInfo;
          ClientProperties properties = info.getProperties();
          propertiesBean.merge(properties);
        }
        else
        {
          warnNotUsingWebClientInfo(clientInfo);
View Full Code Here

      getSession().setClientInfo(clientInfo);
    }
    else if (clientInfo instanceof WebClientInfo)
    {
      WebClientInfo info = (WebClientInfo)clientInfo;
      ClientProperties properties = info.getProperties();
      properties.setJavaEnabled(false);
    }
    else
    {
      warnNotUsingWebClientInfo(clientInfo);
    }
View Full Code Here

        }

        if (clientInfo instanceof WebClientInfo)
        {
          WebClientInfo info = (WebClientInfo)clientInfo;
          ClientProperties properties = info.getProperties();
          propertiesBean.merge(properties);
        }
        else
        {
          warnNotUsingWebClientInfo(clientInfo);
View Full Code Here

    // properties by redirecting to a special page.

    // don't use a property model here or anything else that is resolved
    // during rendering, as changing the request target during rendering
    // is not allowed.
    final ClientProperties properties = ((WebClientInfo)getRequestCycle().getClientInfo())
        .getProperties();

    add(new MultiLineLabel("clientinfo", properties.toString()));

    IModel clientTimeModel = new AbstractReadOnlyModel()
    {
      /**
       * @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
       */
      public Object getObject()
      {
        TimeZone timeZone = properties.getTimeZone();
        if (timeZone != null)
        {
          Calendar cal = Calendar.getInstance(timeZone);
          Locale locale = getLocale();
          DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.LONG, locale);
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.http.ClientProperties

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.