php - Thymeleaf, table in Javascript -


i use thymeleaf print items(each has 3 values) database, html file is:

<!doctype html system "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd"> <html xmlns:th="http://www.thymeleaf.org"> <head>     <meta charset="utf-8"/>     <title>edycja miejsca</title> </head> <body>  <div th:each="items : ${itemslist}">     <div th:object="${items}">         <p th:text="*{id}"/>         <p th:text="*{name}"/>         <p th:text="*{age}"/>     </div>     <br/> </div> </body> </html> 

i try use autocomplete, local static table in javascript, mean:

var gifs = [     { value: 'android-explosion', data: 'ae' },     { value: 'ben-and-mike', data: 'bm' },     { value: 'book-dominos', data: 'bd' },     { value: 'compiler-bot', data: 'cb' },     { value: 'cowboy-coder', data: 'cc' },     { value: 'infinite-andrew', data: 'ia' } ];  $('#autocomplete').autocomplete({     lookup: gifs }); 

works want use autocomplite items database. how can use thymeleaf create dynamic table in javascript?

<script> var table = []; table.push[item]; </script> 


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -