Package org.apache.wicket.protocol.http

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


    // 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)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


      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

      }
     
    }));
    roundpane.add(heightField);     
   
    ClientProperties properties = ((WebClientInfo)getRequestCycle().getClientInfo()).getProperties();
    setBrowserIExplorer(properties.isBrowserInternetExplorer());
    if(isBrowserIExplorer()) {
      if(properties.getBrowserVersionMajor() <=6) {
        setBrowserIExplorer6(true);
      }
    }
    add(CSSPackageResource.getHeaderContribution(RBOX_CSS));
    add(JavascriptPackageResource.getHeaderContribution(DefaultStyle.JS_COMMON));
View Full Code Here

*
*/
public class RequestUtils {
 
  public static Boolean isBrowserIeExplorer() {
    ClientProperties properties = ((WebClientInfo)RequestCycle.get().getClientInfo()).getProperties();   
    return properties.isBrowserInternetExplorer();
  }
View Full Code Here

    ClientProperties properties = ((WebClientInfo)RequestCycle.get().getClientInfo()).getProperties();   
    return properties.isBrowserInternetExplorer();
  }
 
  public static Boolean isBrowserIeExplorer6() {
    ClientProperties properties = ((WebClientInfo)RequestCycle.get().getClientInfo()).getProperties();
    if(properties.isBrowserInternetExplorer()) {
      if(properties.getBrowserVersionMajor() <=6) {
        return true;
      }
    }
    return false;
  }
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

    // 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<String>("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

    /* IE5/6 can't do li:hover, so we need some javascript, see below */

    if (!browserDetected) {
      ClientInfo ci = WebSession.get().getClientInfo();
      if (ci instanceof WebClientInfo) {
        ClientProperties properties = ((WebClientInfo)ci).getProperties();
        if (properties.isBrowserInternetExplorer()) {
          if (properties.getBrowserVersionMajor() < 7)
            browserIsIe56 = true;
        }
      }
      else {
        // perhaps it is IE, we don't know.
View Full Code Here

        /* IE5/6 can't do li:hover, so we need some javascript, see below */

        if (!this.browserDetected) {
            ClientInfo ci = WebSession.get().getClientInfo();
            if (ci instanceof WebClientInfo) {
                ClientProperties properties = ((WebClientInfo) ci).getProperties();
                if (properties.isBrowserInternetExplorer()) {
                    if (properties.getBrowserVersionMajor() < 7) {
                        this.browserIsIe56 = true;
                    }
                }
            } else {
                // perhaps it is IE, we don't know.
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.