How to give value for form input using Spring and Freemarker -
i using spring mvc , freemarker.
i have created form , want put default value forminput
<@spring.forminput "command.name"/>
please give suggestions.
you can specify default value in spring mvc controller. mention freemarker. specify default value using freemarker, follow variable name ! , default value. example, documentation (http://freemarker.org/docs/dgui_quickstart_template.html):
<h1>welcome ${user!"visitor"}!</h1>
however, said, documentation not seem show way specify default way within form. leaves me conclusion need set value in "command object" or "backing object" being sent form rather using template itself.
Comments
Post a Comment