Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's the <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/DOM.html" rel="noreferrer"><code>DOM</code></a> class, that provides many wrapper methods for accessing the DOM tree. There's no function that takes a CSS selector jQuery style that I'm aware of - GWT just encourages/enforces accessing DOM elements through Widgets (and such), not directly - though I understand that in your case such "low-level" approach might be needed. The only way I see pulling that off through pure Java GWT methods is via lots and lots of (probably horrible) chaining/invocations of the <code>DOM</code> class. It'd be easier if all you had to do was access some <code>id</code> - for that there's <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/RootPanel.html#get(java.lang.String)" rel="noreferrer"><code>RootPanel.get(id)</code></a> (and <a href="http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/DOM.html#getElementById(java.lang.String)" rel="noreferrer"><code>DOM.getElementById(id)</code></a>, they differ in what type of objects they return).</p> <p>However, like you already suggested, JSNI might offer a better solution - try returning, for example, <code>$wnd.$("#someId .className a")</code> from JSNI as an <code>Element</code> - actually, you can return anything as anything from JSNI, GWT will just crap up the second you try to use, say an int as a DOM element or something.</p> <p>PS: while the GQuery project does seem dead/inactive, it might be worth checking how they wrapped the jQuery calls (such as <code>$</code>) so that they could be used seemingly in GWT.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload