I don't know what I'm doing wrong. I'm using IceFaces and I have simple managed bean:
public class TestingController {
private String name;
public String submit() {
setName("newName");
return null;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
and view:
<ice:inputText value="#{testController.name}" />
<ice:commandButton value="submit" action="#{testController.submit}" />
When I submit the form after first displaying the page, the input is redisplayed with "newName". When I clear the input field and submit the form again, the name is not redisplayed with "newName" as I would expect, but it's still empty.
How is this caused and how can I solve this?