I need to automatically click the command button "refreshPage" after the JSF page below is loaded: ( having tried the code in Blue commented out I am unlucky. Please help!)
<?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"
xmlns:pe="http://xmlns.oracle.com/adf/pageeditor"
xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable">
<f:loadBundle basename="oracle.webcenter.portalframework.sitestructure.resource.PortalAppPageResource"
var="portalResource"/>
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" title="#{portalResource['home_title']}">
<!-- <af:clientListener method="callRefreshButton" type="load"/>
<af:resource type="javascript">
function callRefreshButton()
{
var buttton = AdfPage.PAGE.findComponentByAbsoluteId("refreshPage");
ActionEvent.queue(button,true);
}
</af:resource> -->
<af:messages id="m1"/>
<af:form id="f1">
<af:pageTemplate value="#{bindings.pageTemplateBinding.templateModel}" id="pt1"
viewId="/oracle/webcenter/portalapp/pagetemplates/pageTemplate_swooshy.jspx">
<f:attribute name="showNavigation" value="#{true}"/>
<f:facet name="content">
<af:group id="g1">
<af:inputText label="Label 1" id="it1"/>
</af:group>
</f:facet>
</af:pageTemplate>
<!-- <af:commandLink id="refreshPage" text="refreshPage"
action="#{WangBean.reloadPage}"
rendered="true"
inlineStyle="font-size:small; color:White;"
partialSubmit="true" clientComponent="true">
</af:commandLink> -->
<af:inputText value="#{bindings.Sdan8.inputValue}"
columns="#{bindings.Sdan8.hints.displayWidth}"
maximumLength="#{bindings.Sdan8.hints.precision}"
shortDesc="#{bindings.Sdan8.hints.tooltip}" id="it2"
visible="false"
inlineStyle="font-size:medium; font-weight:bold;">
<f:validator binding="#{bindings.Sdan8.validator}"/>
<af:convertNumber groupingUsed="false"
pattern="#{bindings.Sdan8.format}"/>
</af:inputText>
</af:form>
</af:document>
</f:view>
</jsp:root>