I have created a little XPage search form with a backing bean. This works great with strings, everything is bound using Expression Language and I can access the value in my bean to compose the actual search string.
However, this doesn't seem to be working for dates. I have a date field that looks like this:
<xp:inputText
themeId="Field.Date"
id="inputStartDate" value="#{Search.calStart}">
<xp:this.converter>
<xp:convertDateTime type="date"></xp:convertDateTime>
</xp:this.converter>
</xp:inputText>
My bean has a very basic getter/setter for this:
public Date getCalStart() {
return calStart;
}
public void setCalStart(Date calStart) {
this.calStart = calStart;
}
The problem is that while the field will populate from the backing bean, the bean is not affected by the field. So if in my constructor I set a date field to 7/18/2014, it looks fine on my page. But if I pick a date on the page and perform a refresh, the value does not change in the bean. The dates remain null
or whatever I've initialized them to in the bean.
Is there something about the converter (other than handling it as a Java Date
in my bean, which I'm doing) that breaks the value binding?