Package net.relatedwork.shared

Examples of net.relatedwork.shared.DisplayableItemSuggestion


        setPersonalizedSuggestTree();
       
        // Add personalized suggestions to list
        SuggestionList list = personalizedSuggestTree.getBestSuggestions(request.getQuery());
        for (int i=0;i< list.length();i++){
          suggestionList.add(new DisplayableItemSuggestion(list.get(i), request.getQuery(),true));
        }
        r.setSuggestions(suggestionList);
        callback.onSuggestionsReady(request, r);

        //Get suggestions
        dispatcher.execute(
            new RequestGlobalSearchSuggestion(request),
            new AsyncCallback<RequestGlobalSearchSuggestionResult>() {
              @Override
              public void onFailure(Throwable caught) {
              }
             
              @Override
              public void onSuccess(
                  RequestGlobalSearchSuggestionResult result) {
               
                // add results to local suggest tree
                for (Suggestion sug : result.getResponse().getSuggestions()) {
                  suggestionList.add(new DisplayableItemSuggestion(sug.getDisplayString(),request.getQuery(),false));
                }
                r.setSuggestions(suggestionList);
                callback.onSuggestionsReady(request, r);
              }
            });
View Full Code Here

TOP

Related Classes of net.relatedwork.shared.DisplayableItemSuggestion

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.