Example usage for com.google.gwt.query.client GQuery get

List of usage examples for com.google.gwt.query.client GQuery get

Introduction

In this page you can find the example usage for com.google.gwt.query.client GQuery get.

Prototype

public NodeList<Element> get() 

Source Link

Document

Return all elements matched in the GQuery as a NodeList.

Usage

From source file:com.google.gwt.site.demo.AbstractDemos.java

License:Apache License

@Override
public void onContentLoaded() {
    GQuery demos = $("//div[@id='content']//div[starts-with(@id, '" + prefix + "')]");

    NodeList<Element> nodeList = demos.get();
    for (int i = 0; i < nodeList.getLength(); i++) {
        Element item = nodeList.getItem(i);

        Widget demo = getDemoToLoad(item.getId().replace(prefix, ""));
        if (demo != null) {
            HTMLPanel panel = HTMLPanel.wrap(item);
            panel.add(demo);/*w w w  .j a  v a2s.com*/
        }
    }
}