Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

adf 12c actionListener setPropertyListener execution order?

PaKoMar 15 2017 — edited Mar 15 2017

Can someone explain execution order of e.g. af:button actionListener property and af:setPropertyListener attached to it?

<af:commandButton actionListener="#{testBean.sayHello}" id="b1" text="Test">

                                <af:setPropertyListener from="#{testBean.test}"

                                                        to="#{requestScope.test}" type="action"/>

</af:commandButton>

Backing bean methods:

@ManagedBean(name = "testBean")

@RequestScoped

public class TestBackingBean {

    public void sayHello(javax.faces.event.ActionEvent actionEvent) {

        System.out.println("sayHello");

    }

    public final String getTest() {

        return "Test!";

    }

}

When testing in JDev 12.2.1.2 always getTest() is called BEFORE sayHello().

It is contrary to how it was in 11g R2: actionListener was always first to be executed then setPropertyListener.

It was different with Facelets than with JSP as explained here:

http://www.ateam-oracle.com/setpropertylistener-and-setactionlistener-might-fire-too-late-when-using-facelets/

But now again it looks like order is inverted?!

Can someone point where in documentation is specified execution order? I was looking into Oracle/Trinidad docs but there is nothing on execution orders. In JSF 2.2 or Facelets docs maybe, but I could not find it neither.

Please help. This is very confusing.

Message was edited by: PaKo

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2017
Added on Mar 15 2017
1 comment
476 views