Possibly a simple one, but if I want to have multiple requests mappings within
the same Controller with the same RequestMethod (i.e. POST) how do I map them
in the JSP form tag?
E.g.
[code]
@Template(title = "Solr Search", id = "our-web:components/solrSearch")
@TemplateDescription("A solr search component")
@Controller
@Search
public class SolrSearch {
@Autowired
@Qualifier("solrSearchService")
private SearchService searchService;
@RequestMapping(method = RequestMethod.GET, value = "/solrSearch")
public String render(ModelMap model, HttpSession session) {
return "components/search/solrSearchView.jsp";
}
@RequestMapping(method = RequestMethod.POST, value = "/solrSearch")
public String search(ModelMap model, HttpSession session) {
List<Location> locations = searchService.readAllLocations();
return "components/search/searchSolr.jsp";
}
@RequestMapping(method = RequestMethod.POST, value = "/solrSearch/create")
public String add(ModelMap model, HttpSession session) {
searchService.createAllLocations();
return "components/search/submitSolr.jsp";
}
}
[/code]
JSP:
[code]
Submit a search to SOLR:
<form action="?" method="POST">
<blossom:pecid-input />
<input type="text" name="q" />
<input type="submit" value="Search" />
</form>
Submit JCR locations to SOLR:
<form action="XXX" method="POST">
<blossom:pecid-input />
<input type="text" name="q" />
<input type="submit" value="Search" />
</form>
[/code]
(i.e. what goes in the form action denoted by XXX?)
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=aa25d25b-118d-49a7-860c-789d3e2ef9a0
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------