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();
}