title: GWT JSNI BOOLEAN
body: <p>Here's my code:</p>
  
  <pre><code>package com.eggproject_hu.WPECommerceAdminSales.client;
  
  import java.lang.Boolean;
  
  import com.google.gwt.core.client.GWT;
  import com.google.gwt.user.client.Window;
  
  public class AblakVillogo
  {
      public static Boolean focusedWindow = true;
      private static Boolean init = false;
  
      public static void setFocused(Boolean focus)
      {
          focusedWindow = focus;
      }
  
      public static Boolean getFocused()
      {
          return focusedWindow;
      }
  
      public static void focusVizsgalat()
      {
          if(focusedWindow == true)
          {
              GWT.log("igen");
          }
          else
          {
              GWT.log("nem");
          }
      }
  
      public static void init()
      {
          if(init == false)
          {
              _init();
          }
      }
  
      private native static void _init() /*-{
          $wnd.jQuery(document).ready(function()
          {
              $wnd.jQuery($wnd).focus(function()
              {
  @com.eggproject_hu.WPECommerceAdminSales.client.AblakVillogo::focusVizsgalat()();               @com.eggproject_hu.WPECommerceAdminSales.client.AblakVillogo::setFocused(Ljava/lang/Boolean;)(true);
                  $wnd.console.log("focus");
              }).blur(function()
              {
                  var ret = false;
                  @com.eggproject_hu.WPECommerceAdminSales.client.AblakVillogo::focusVizsgalat()();
                                  @com.eggproject_hu.WPECommerceAdminSales.client.AblakVillogo::setFocused(Ljava/lang/Boolean;)(false);
                  $wnd.console.log("blur");
              });
          });
      }-*/;
  }
  </code></pre>
  
  <p>I see this in the browser console:</p>
  
  <blockquote>
    <p>uncaught exception: java.lang.IllegalArgumentException: invoke arguments: JS value of type boolean, expected java.lang.Boolean</p>
  </blockquote>
  
  <p>I've tested in Chrome and Firefox.</p>
  
  <p>What is the problem?</p>
  
  <p>Thanks for the help!</p>