Modelling Object Change with Ajax

Asked

Viewed 98 times

1

 @GetMapping("/cadastrarProduto")
 public ModelAndView cadastrarProduto() {
     modelAndView = new ModelAndView("pages/index");
     addObject("produtoEntity", new ProdutoEntity());
     modelAndView;
 }

It is possible with ajax to change the attributes values of the Product object() passed in the example above?

  • Voce uses Convert in project?

  • In some entities yes, usually in attributes of type Enum or Localdate

  • The best solution I could find was to send a @Modelattribute to Submit and capture the object on the server side.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.