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!

How to execute a method after page Load?

Tiny_Aug 20 2009 — edited Aug 24 2009
Hello

I have an ADF application in JDeveloper 11g, I want to execute a method in some managed bean when new page loads.
I made new managed bean and I can use it perfect, my method inside it like this :

public void setPermPriv(){ ..... }

Now I tried several ways to run it, but all of them give me the same error:

1- I tried server and client listener at page :
<af:clientListener method="setPermPriv" type="load"/>
<af:serverListener type="loadEvent"
method="#{backingBeanScope.backing_Security.setPermPriv}"/>

2- I tried after phase at page :
<f:view afterPhase="#{backing_security.setPermPriv}">

3- I tried method-call at adfc-config.xml :
<method-call id="prepPermPriv">
<method>#{backing_security.PermPriv}</method>
<outcome>
<fixed-outcome>goMain</fixed-outcome>
</outcome>
</method-call>

And always I get this error :(

WARNING: Error setting:'#{backing_security.setPermPriv}' to value:1 from:'1'
javax.el.PropertyNotFoundException: The class 'modules.Security' does not have the property 'setPermPriv'.

then I Added a property to that managed bean, but I still get the same error :(
<managed-property>
<property-name>setPermPriv</property-name>
<property-class>modules.Security</property-class>
<value>#{backing_security.checkPriv}</value>
</managed-property>

What is the right way to do this task ??
Thanks a lot
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2009
Added on Aug 20 2009
7 comments
4,957 views