Search this blog ...

Tuesday, August 17, 2010

ADF11g Add javascript to jspx / trigger javascript onLoad event

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  <jsp:directive.page contentType="text/html;charset=UTF-8"/>
  <f:view>
    <af:document id="d1">
      <f:facet name="metaContainer">
        <af:group id="g1">
          <af:resource type="javascript">
            function someFunction()
            {
              alert('hello');
            }
          </af:resource>
          <af:resource type="javascript" source="xxx.js"/>
        </af:group>
      </f:facet>
      <af:clientListener method="someFunction" type="load"/>
      <af:form id="f1"> …
      </af:form>
    </af:document>
  </f:view>
</jsp:root>

No comments:

Post a Comment

OSZAR »