Hallo,
I have a UI, with 2 text boxes and a button.

The html code is basic as shown:
The corresponding controller has the following code :
Even if I enter the dates and press the button, on the addressbar I see that the values are null. Please tell me what I am doing wrong?
I have a UI, with 2 text boxes and a button.

The html code is basic as shown:
HTML:
<div class="col-2">
<input type="text" class="form-control" id="txtFrom"
placeholder="start date(yyyy-mm-dd)" th:value="${dateFrom}">
</div>
<div class="col-2">
<input type="text" class="form-control" id="txtTo"
placeholder="end date(yyyy-mm-dd)" th:value="${dateTo}">
</div>
</div>
<div>
<br>
</div>
<div class="row">
<div class="row-2">
<!-- <input type="button" value="Validate"> -->
<a th:attr="href='/formularForm?from='+${dateFrom}+'&to='+${dateTo}"
class="btn btn-primary btn-sml" role="button" aria-disabled="true" >Check</a>
</div>
</div>
Java:
@GetMapping("/formularform?from={dateFrom}&to={dateTo}")
public String validateData(@PathVariable String dateFrom, @PathVariable String dateTo, Model model) throws IOException, SQLException
{
logger.info("inside the datefrom dateto");
return "formularform";
}
Even if I enter the dates and press the button, on the addressbar I see that the values are null. Please tell me what I am doing wrong?