Package org.sgx.yuigwt.galleryexplorer.client.search

Examples of org.sgx.yuigwt.galleryexplorer.client.search.ByRequiresSearcher


      resultTable.render();
    }
  })).render(byTag);
 
  //search by requires
  final ByRequiresSearcher byRequiresSearcher = new ByRequiresSearcher(util, "");
  final Node byRequiresInput = byRequires.appendChild("<input type=\"text\" value=\"\"></input>");
 
  AutoComplete acRequires = Y.newAutoComplete(AutoCompleteConfig.create().
    resultHighlighter("phraseMatch").
    inputNode(byRequiresInput).
    source(byRequiresSearcher.autocompleteData()).
    render(true)
  );  
  Y.newButton(ButtonConfig.create().label("Search").
    on("click", new EventCallback<ButtonEvent>() {
    @Override
    public void call(ButtonEvent e) {
      String keyword = byRequiresInput.get("value");
      byRequiresSearcher.setRequire(keyword);
      JsArray<Module> results = SearchUtil.search(util.getModules(), byRequiresSearcher);
      console.log("search by Requires keyword: "+keyword+", results: "+results.length());
      resultTable.data(results);
      resultTable.render();
    }
View Full Code Here

TOP

Related Classes of org.sgx.yuigwt.galleryexplorer.client.search.ByRequiresSearcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.