Например, предположим, что у нас есть представление (называемое view.jsp), которое использует компонент Bean (называемый Bean.java), который создается и заполняется контроллером (называемым Controler.java, извините за дешевые имена
Bean.java
Class Bean {
Collection values;
// setters and getters
}
view.jsp
// (*) the idea is here use the right component, not a select, because a select excludes some values, and i want all values!
Controller.java
protected ModelAndView onSubmit(final HttpServletRequest request,
final HttpServletResponse response, final Object command,
final BindException errors) throws Exception {
Bean bean = (Bean) command;
bean.getValues();
// do my bussiness-model stuff
}
Подробнее здесь: https://stackoverflow.com/questions/208 ... e-elements
Мобильная версия