tags:

views:

36

answers:

0

I am getting double input value through h:inputText component.

<h:inputText value="#{bean.testValue}" />

And the bean is

class Bean{
private Double testValue;


    public Double getTestValue() {
        return testValue;
    }

    public void setTestValue(Double testValue) {
        System.out.println("testValue="+testValue);
        this.testValue = testValue;
    }
}

When I enter any value and submit I can see the double value populated in the bean. Problem comes when I empty the field and submit. I was expecting null to be populated in the bean. But JSF is populating previous value. I tried introducing f:convertor but no luck.

Example: The input element is under the hierarchy tab

<h:form>
    <include one xhtml file>
</h:form>


in the included xhtml file

    <h:column>
        <ui:fragment>
            <a4j:outputPanel>
                <ui:repeat>
                    <h:inputText>

How is this caused and how can I solve this?