spring mvc - the array list from database is not displaying on browser but i can see it on the eclipse console -
this controller
@requestmapping(value = "/users/{userid}/providers/{providerid}/check", method = requestmethod.get) public string initnewdocumentform121(@pathvariable("userid") int userid,@pathvariable("providerid") int providerid, model model) { list<jdbcdocument> documents = this.clinicservice.findbyprovideridanduserid(providerid, userid); system.out.print("findbyprovideridanduserid"); system.out.print(documents); return "users/myproviders"; }
i can see documents array on eclipse console not on browser.
<select id="provider" class="form-control"> <option th:value="0" >select service provider</option> <option th:each="document : ${documents}" name="name" th:value="${document.id}" th:text="${document.name}">[name]</option> </select>
this html. cannot see output on browser. please guide me.
after getting object, have add object model
below forward :
model.addobject("documents", documents);
Comments
Post a Comment