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

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


  Node byTag = parent.one("#search1-by-tag");
  Node byRequires = parent.one("#search1-by-requires")
  resultContainer = parent.one("#search1-result-container");
 
  //search by name:
  final ByNameSearcher byNameSearcher = new ByNameSearcher(util, "");
  final Node byNameInput = byName.appendChild("<input type=\"text\" value=\"\"></input>");
 
  AutoComplete ac = Y.newAutoComplete(AutoCompleteConfig.create().
    resultHighlighter("phraseMatch").
    inputNode(byNameInput).
    source(byNameSearcher.autocompleteData()).
    render(true)
  );  
  Y.newButton(ButtonConfig.create().label("Search").
    on("click", new EventCallback<ButtonEvent>() {
    @Override
    public void call(ButtonEvent e) {
      String keyword = byNameInput.get("value");
      byNameSearcher.setName(keyword);
      JsArray<Module> results = SearchUtil.search(util.getModules(), byNameSearcher);
      console.log("search by name keyword: "+keyword+", results: "+results.length());
      resultTable.data(results);
      resultTable.render();
    }
View Full Code Here

TOP

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

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.