webtier@glassfish.java.net

Behavior of the f:event and postValidate event

From: <webtier_at_javadesktop.org>
Date: Thu, 22 Jul 2010 02:56:56 PDT

In the example below I'm was expecting that the postValidate method would fire after the value of the input field has been converted. Currently, the postValidate method is executed before.

[code]
        <h:form id="testForm">
            <h:inputText id="testInput" value="#{testBean.object}">
                <f:event listener="#{testBean.postValidate}" type="postValidate"/>
            </h:inputText>
        </h:form>
[/code]

So, in order to process the converted input value I must put the f:event in the parent form like this:

[code]
        <h:form id="testForm">
            <f:event listener="#{testBean.postValidate}" type="postValidate"/>
            <h:inputText id="testInput" value="#{testBean.object}"/>
        </h:form>
[/code]

Is this the correct behavior?

(Works the same in mojarra 2.0.2 and 2.0.3)
[Message sent by forum member 'janderssn']

http://forums.java.net/jive/thread.jspa?messageID=478249