thymeleaf/thymeleaf-spring — pull request #61 by AlexeyDuzhy (2014-06-11 22:09:51+00:00)
Title: Ability to set input's value if corresponding value of model attribute is null

I have faced the following problem: in my app I'd like to set hidden form input value from incoming model to model attribute field. Here code example:
FormDto
```java
public class FormDto {
private String field;
//getter and setter
}
```

Controller
```java
@ModelAttribute("formDto")
public FormDto getFormDto(){
return new FormDto();
}

@RequestMapping("/form")
public String fillForm(Model model){
model.addAttribute("formField", "testFormField");
return "form";
}
```

form.html
```html

```

After parsing have the following result:
```html

```
As we can see value is omitted.

In pull request I've created ability to get value of "value" attribute if corresponding field in ModelAttribute is null. It can be very useful for hidden fields.

Thank you for you time