0
Well I’m having a hard time understanding how to work with an object that comes from my javascript controller, I’ve already done some tests to make sure that this information has gone up correctly to the view however, do not understand how to work this information in javascript if someone can help I will be grateful.
follows the controller I use to move up the object list
@RequestMapping(value = "/show/{id}", method = RequestMethod.GET)
public ModelAndView viewPesquisar(@PathVariable("id") Long id, ModelMap
model, HttpServletRequest request) {
LOGGER.debug(" O id a ser consultado é {}", id);
List<Ito> optional = itoService.findByIdFetchAll(id);
if (optional.isEmpty()) {
LOGGER.debug(" Não foi possivel localizar o Tipo com o Id:{}", id);
throw new BusinessException("Não foi possivel Localizar o Tipo de Projeto");
}
List<Ito> listaCompletaItos = itoService.findByIdFetchAll(id);
model.addAttribute("listaCompletaItos", listaCompletaItos);
return new ModelAndView(REQUEST_MAPPING_PAGE_SHOW_ITO);
}
I send the information to the view through Modelandview I can not say if it is the best way in this case.
There’s no way you can have one
controller no javascript
since [tag:javascript] is a client-side language run by the Browser.– Paulo Roberto Rosa
right the question is how can I work this list within javascript
– Wesley Santos