KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I would like to share my problem with you. I built on jsp page and use on my page some of <form:select> it use <form:select> to extract and render data from DB when I request the page search.jsp and user have to select one: <form action="result" method="get" > <table> <tr> <th>Date fro DB:</th> <td><form:select path="listOfDates"> <form:option value="NONE"> --SELECT--</form:option> <form:options items="${listOfDates}"></form:options> </form:select> </td> </tr> <tr> <th>Name of company from DB:</th> <td><form:select path="listOfInstitutionsNames"> <form:option value="NONE"> --SELECT--</form:option> <form:options items="${listOfInstitutionsNames}"></form:options> </form:select> </td> </tr> <tr> <th>Type of company from DB:</th> <td> <form:select path="listOfInstitutionsTypes"> <form:option value="NONE"> --SELECT--</form:option> <form:options items="${listOfInstitutionsTypes}"></form:options> </form:select> </td> </tr> <tr> <td><input type="submit" value="Извлечь"/></td> </tr> </table> </form> I need to pass what user select as request parameter to my controller, here is the code of controller: @Controller public class HomeController{ @Autowired private ControllerSupportClass controllerSupportClass; @RequestMapping(value="/search", method=RequestMethod.GET) public String search(Model model) { List<Date> listOfDates = controllerSupportClass.findAllDatesForm(); List<String> listOfInstitutionsNames =
Tags (comma-separated)
Save Edits
Cancel