@@ -0,0 +1,1774 @@
+/**%0A * Copyright %C2%A9 2011-2012 EMBL - European Bioinformatics Institute%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22); %0A * you may not use this file except in compliance with the License.  %0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage uk.ac.ebi.phenotype.web.controller;%0A%0Aimport org.springframework.stereotype.Controller;%0Aimport org.springframework.ui.Model;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestParam;%0A%0A@Controller%0Apublic class SearchController %7B%0A%0A%09/**%0A%09 * redirect calls to the base url to the search page%0A%09 * %0A%09 * @return%0A%09 */%0A%09@RequestMapping(%22/index.html%22)%0A%09public String rootForward() %7B%0A%09%09return %22redirect:/searchAndFacet%22;%0A%09%7D%0A%0A%09/**%0A%09 * %3Cp%3E%0A%09 * Simply takes us to the generic search/data faceting page.%0A%09 * %3C/p%3E%0A%09 * %0A%09 * @param model%0A%09 * @return%0A%09 */%0A%09@RequestMapping(%22/searchAndFacet%22)%0A%09public String loadAutosuggestSearchFacetPage(%0A%09%09%09@RequestParam(value = %22queryString%22, required = false) String queryString,%0A%09%09%09@RequestParam(value = %22type%22, required = false) String type,%0A%09%09%09@RequestParam(value = %22geneFound%22, required = false) String geneFound,%0A%09%09%09Model model) %7B%0A%0A%09%09System.out.println(queryString);%0A%09%09model.addAttribute(%22queryString%22, queryString);%0A%09%09model.addAttribute(%22queryType%22, type);%0A%09%09model.addAttribute(%22queryGeneFound%22, geneFound);%0A%0A%09%09return %22searchAndFacet%22;%0A%09%7D%0A%7D%0A

add base path (index.html) redirect to searchAndFacet formatting Added code for image facet - added preliminary custom 403/404/500 pages - updated web.xml for custom 403/404/500 pages - added MpController to check for solr query result on the server side and direct users to the custom 404 page if 0 doc is found Ie, this is no longer controlled from the client side fixed MP/MA facet count not displayed issue when search was coming from redirected page Propagate POSTed variables to the view added search/facet and mp pages