Spring thymeleaf th:each fails with Field or property "" cannot be found on null -


i new thymeleaf, have few other pages working. however, first time using th:each , getting error. @ runtime, "field or property 'licensename' cannot found on null". ran debug , passing arraylist of objects in modelanview object. have copied , pasted on model key th:each attribute, in case mist typed something. here offending code:

                    <select th:remove="all-but-first" id="accountplans">                         <option th:each="license : ${availablelicenses}" th:text="${licnese.licensename}" value="none">-- select plan --</option>                         <option value="free">free - plan learn basics</option>                         <option value="intro">intro - starter plan small founding group</option>                         <option value="basic">basic - plan small group</option>                     </select> 

you have typo licnese.licensename instead of license.licensename. that, probably, reason error


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -