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

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

Introduction

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

Prototype

public GQuery find(String... filters) 

Source Link

Document

Searches for all elements that match the specified css expression.

Usage

From source file:org.kaaproject.avro.ui.gwt.client.widget.choosen.AvroChoosenListBox.java

License:Apache License

public static void setChoosenSearchFieldWidth(ChosenListBox box, String width) {
    ChosenImpl impl = $(box.getElement()).data(CHOSEN_DATA_KEY, ChosenImpl.class);
    if (impl != null) {
        GQuery searchfield = impl.getContainer().find("li." + avroChoosenResources.css().searchField()).first();
        searchfield.width(width);/*from w w w.  j av  a 2s  .c  o m*/
        GQuery searchFieldInput = searchfield.find("input." + avroChoosenResources.css().defaultClass())
                .first();
        if (searchFieldInput != null) {
            searchFieldInput.width(width);
        }
    }
}

From source file:org.otalo.ao.client.widget.chlist.client.ChosenImpl.java

License:Apache License

private void noResults(String terms) {
    if (!this.options.isHideNoResult()) {
        GQuery noResults = $(ChozenTemplate.templates.noResults(css.noResults(), resultsNoneFound).asString());
        noResults.find("span").html(terms);

        searchResults.append(noResults);
    }/*from   w w  w  .ja v a 2 s . co m*/
}

From source file:org.otalo.ao.client.widget.chlist.gwt.ChosenListBox.java

License:Apache License

private GQuery getFocusableElement() {
    GQuery chosen = getChosenElement();
    GQuery focusableElement = chosen.children("a");
    if (focusableElement.isEmpty()) {
        focusableElement = chosen.find("input");
    }//ww  w .  jav  a2 s  .  c om
    return focusableElement;
}