Search code examples
jsficefaces

Icefaces: How to use OnLoad


I'm new to Icefaces. I want to know how to use onload method, or I want to call some methods when the page is loading.


Solution

  • In your JSF page:

    <f:event type="preRenderView"
            listener="#{yourManagedBean.yourMethod()}" />
    

    In YourManagedBean.java:

    public void yourMethod() {
       ...
    }