Personal tools

Netbeans:NetbeansGWTMisc

From Adapt

Revision as of 23:13, 11 September 2008 by Scsong (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To get the search string from the URL of the current page view:

public static native String getSearchURL() /*-{
   return $wnd.location.search.substring(1)
}-*/;

Check IE version for PNG hack (needs to be updated to exclude IE7)

public static native boolean needsPNGHack() /*-{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && ($doc.body.filters)) 
      return true
   else                   
      return false
}-*/;

Other stuff:

  • Don't rely on hashCode: If you create a custom class and try to put it in a HashMap it will not work as intended. Overriding hashCode seems to have no effect.