I understand that should not work according to JEE6 tutorial.
<h:inputText value="${bean.name}/>
and managed bean
@ManagedBean
public class Bean {
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
But it work perfectly and I can read the ‘name’ property from the response page. I thought it only work with deferred evaluation #{expr} for writable properties.
According to the JEE6 tutorial:
So that may lead you to think that you can’t use
${}in a writable property, but if you read later:So, if I’m not mistaken, this doesn’t contradict the former. It just means that when you use
<h:inputText value="${bean.name}"/>it will be used to read thenameproperty, but it won’t write it if you modify the content in theinputText.