Permalink
Browse files

Search now allows for WHAT search.

  • Loading branch information...
1 parent e3ad969 commit 2b75e1026aae5d1ba33d1f8d17436fe412839699 @mchandler committed Mar 20, 2012
@@ -12,7 +12,7 @@
@RequestMapping(value = "/")
public ModelAndView home() {
- PlacesSearch search = new PlacesSearch("Restaurant", Constants.SITEWIDE_CITY_STATE);
+ PlacesSearch search = new PlacesSearch("Restaurant", Constants.SITEWIDE_CITY_STATE, "");
ModelAndView view = new ModelAndView();
view.setViewName("home");
@@ -18,12 +18,17 @@
private int page;
private int resultsPerPage;
- public PlacesSearch(String searchType, String where) {
+ public PlacesSearch(String searchType, String where, String what) {
super();
CGPlacesSearch search = CityGrid.placesSearch();
search.setType(CGPlacesSearchType.Restaurant); // TODO: Handle search types
search.setWhere(where);
+
+ if (what.trim().length() > 0) {
+ search.setWhat(what);
+ }
+
search.setResultsPerPage(Constants.SEARCH_RESULTS_PER_PAGE);
try {

0 comments on commit 2b75e10

Please sign in to comment.