0 Replies Latest reply on Nov 20, 2007 4:55 PM by Jose Miguel Loor

    facelets problem

    Jose Miguel Loor Apprentice

      Hi:

      i have a project with facelets and rich-faces and have a situation with a a4j:jsFunction call. I will describe a little further:

      i have a template:

      <html xmlsns="......">
       <a4j:form>
       <ui:insert name="body">...</ui:insert>
       </a4j:form>
      </html>
      


      and a x page:

      <html xmlsns="......">
       <ui:composition template="template.xhtml">
       <ui:define name="body">
       <a4j:region id="xRegion">
       <a4j:jsFunction id="xFunction" name="loadFunction" actionListener="#{xController.xActionListener}" />
       <script type="text/javascript">
       loadFunction();
       </script>
       </a4j:region>
       </ui:define>
       </ui:composition>
      </html>
      


      as you see, i am trying to create the a4j:form in the template, and in the composition use only a4j:region components, so i wont have a a4j:form for each page (this is because i need some behaviour in the template)

      but the thing is that the call to loadFunction() is not triggering the xController.xActionListener

      this behaviour is the same no matter if i place the a4j:jsFunction inside or outside the a4j:region component of the second page (x page)

      also i have the same problem with this
      <h:outputLink value="/someUrl">
       <h:outputText value="link text"/>
       <a4j:support event="onclick" actionListener="#{xController.xActionListener}" />
      </h:outputLink>
      


      in this second case, the xController.xActionListener is never triggered when i click the rendered link in the page

      thanks a lot for your help