jquery - Initial value to textarea field in form tld -
I am using Spring MVC and in my jasp page I have a form with textarea.
I want the text to be full of some text (this is an editing feature for the article).
I tried the following.
& lt; form: textarea id = "description" path = "article.description" value = "$ {article.description}" onKeyUp = "validation method ($ (this));" OnKeyDown = "validationmethod ($ (this));" / & Gt; but my text is still empty ..
value = "" attribute & lt; Forms perfectly well for the form: If I try to put it above the tag then I get a warning "Form: Teddera should not be empty".
Please help.
When the form tag is used then there is no value property in the texterity. Path property is used for data binding. For example, before presenting the view you are using this teXteria, populate the model object with the data in your controller:
@RequestMapping (value = " / readyArticleForm ") Public ModelAndView Ready Article (Model Model) {Article Article = New Article (); article.setDescription ("Your Text"); Return a new model, Andrew ("articleview," "article", article); } See your articles jsp:
& lt; Form: form action = "someAction" commandName = "article" method = "post" & gt; Textaria details: & lt; Form: textarea path = "description" onKeyUp = "verification method ($ (this));" OnKeyDown = "validationmethod ($ (this));" /> & Lt; / Form: Form & gt;
Comments
Post a Comment