Spring MVC and html input -


itemprop = "text">

In the spring 3.1 web MVC form, I am using the following fields, taking the date from the date and the field with the string < / Code>. I am getting all the values ​​but I can not find the date field.

Try earlier

  & lt; Form: input id = "fromDate" Class = "mydate" path = "fromDate" size = "10" maximum length = "10" /> & Lt; Script type = "text / javascript" & gt; Spring.addDecoration (New Spring.ElementDecoration ({elementId: 'fromDate', widgetType: 'dijit.form.DateTextBox', widgetAttrs: {promptMessage: 'Enter from date', Invalid message: 'Please enter valid date', required : False, Obstacles: {datePattern: 'dd / MM / yyyy', Required: False}, Date Pattern: 'DD / MM / Yay'}}))); & Lt; / Script & gt;   

Try another

  & lt; Input id = "toDate" class = "mydate" path = "toDate" size = "10" McLean Lang = "10" /> & Lt; Spring: Tie Path = "Plan" Quantity.to Date "> $ {status.value} & lt; / spring: bind> gt; script type =" text / javascript "& gt;   

Is it possible to use simple HTML input tags and is bound with Spring MVC.

Yes, it is possible to use simple HTML input tags.
Add a commandName attribute like this in the form tag

  
: Form commandName = "attribute" name = "createForm" id = "createForm" Accept Chargeet = "UTF-8" method = "post" action = "create" & gt;

Now add @ModelAttribute to your controller class

  @RequestMapping (value = "create", method = RequestMethod.POST) Create public string attribute (model model, @ModelAttribute YourPojoClass attribute, errors errors)    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -