Input components not updating after submitting empty value  XML
Forum Index -> Components
Author Message

Joined: 27/Nov/2006 00:00:00
Messages: 332

Hi there,
The usage scenario is a little bit complex, but please follow this through:
1. The controller:
 public class TestController {
 	private String value;
 	public String getValue() {
 		System.out.println("Getting value: [" + value + "]");
 		return value;
 	public void setValue(String value) {
 		System.out.println("Setting value: [" + value + "]");
 		this.value = value;
 	public String submit() {
 		value = "testValue ";
 		return null;

2. The view
 		<h:inputText value="#{testController.value}" />
 		<hr />
 		<ice:commandButton value="Submit" action="#{testController.submit}" />

3. The behavior:
a. submit empty value => the value gets set on the bean to "testValue" and shows on the page (updates happen on icefaces log console)
b. submit again empty value => value get set on the bean to testValue, but doesn't show on the page (no updates come back, according to icefaces log console)

a. submit any non empty value => value gets set on the bean to "testValue" and shows on the page
b. submit an empty value => values gets set on the bean to "testValue" but doesn't show on the page (no updates happen)

replace "testValue" with "testValue" + new Date() ==> it behaves correctly

Conclusion: the problems comes from the fact that in I and II the "testValue" is always the same coupled with the fact that submitted value is empty.

1. testController is extendedRequestScoped
2. If i use a plain jsf project (putting testController in the session scope) everything works normally, which makes me think that the problem comes from computing the diff on the server side.


Eduard Korenschi
Forum Index -> Components
Go to:   
Powered by JForum 2.1.7ice © JForum Team