3
You can mount a link(href) or action(form) by taking the value of an input to pass to a @Pathvariable of a method in the controller?
My code is next 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>