Is it possible to create a link (href) or an action (form) by taking the value of an input to pass to a @PathVariable of a method in the controller?
My code is the following in the controller:
@RequestMapping(value="atendimentos/{numeroChamado}", method=RequestMethod.GET)
public ModelAndView detalhe(@PathVariable("numeroChamado") Long numeroChamado){
...
}
I would like to mount the link in a href or form, for example
<form:form action="/atendimentos/{valorDoInput}" id="formBusca" method="get" >
<input type="text" id="buscaChamado" placeholder="Número do Chamado" name="numeroChamado" />
</form:form>
or
<a href="/atendimentos/{valorDoInput}"><input type="text" id="buscaChamado" placeholder="Número do Chamado" name="numeroChamado" /></a>