title: AdfPage.PAGE.findComponentByAbsoluteId returns null
body: <p>I am trying to execute some javascript when the page rendering process is going.
  The code is:</p>
  
  <pre><code>    &lt;af:document title="Page1" id="d1"&gt;
          &lt;af:resource type="javascript" source="/resources/js/jquery-1.3.2.js"/&gt;
          &lt;af:form id="f1"&gt;
              &lt;af:panelStretchLayout id="psl1"&gt;
                  &lt;f:facet name="center"&gt;
                      &lt;af:panelGroupLayout id="pgl1"&gt;                            
                          &lt;af:panelGroupLayout id="main" styleClass="AFStretchWidth" layout="vertical" clientComponent="true"&gt;
                              &lt;af:clientListener method="onMainClick" type="click"/&gt;
              &lt;af:serverListener type="clickOnMain" method="#{bean.someMethod}"/&gt;
                          &lt;/af:panelGroupLayout&gt;                                  
                      &lt;/af:panelGroupLayout&gt;
                  &lt;/f:facet&gt;
              &lt;/af:panelStretchLayout&gt;
  
              &lt;af:resource type="javascript"&gt;
          var main = AdfPage.PAGE.findComponentByAbsoluteId('main');
          alert(main);
          if(main != null) {
              ActionEvent.queue(main, true);
          }
              &lt;/af:resource&gt;
      &lt;af:resource type="javascript"&gt;
          onMainClick = function (event) {
              AdfCustomEvent.queue(event.getSource(), "clickOnMain",  {}, true);
          }
              &lt;/af:resource&gt;
          &lt;/af:form&gt;            
      &lt;/af:document&gt;
  </code></pre>
  
  <p>But the alert() is showing "null" and eventually the next ActionEvent.queue is not executing. </p>
  
  <p>Can anyone tell me how can I solve this problem?</p>