次の JSF ページで、ページの読み込み時に commandButton アクション リスナーを実行する必要がある状況があります。
<?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:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:trh="http://myfaces.apache.org/trinidad/html">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
<af:document id="d1" partialTriggers="pt1">
<af:resource type="javascript">
function callCustomButton(){
var button =AdfPage.PAGE.findComponentByAbsoluteId("cbCustomFields");
ActionEvent.queue(button,true);
}
</af:resource>
<af:clientListener method="callCustomButton" type="load"/>
<af:form id="f1">
<af:pageTemplate viewId="/ESOPM_Base_Template.jspx" id="pt1">
<f:facet name="main_content">
<af:decorativeBox id="db1" theme="medium">
<f:facet name="top"/>
<f:facet name="center">
<af:panelGroupLayout layout="scroll" id="pgl2">
<trh:tableLayout id="tblUpload" cellPadding="3" cellSpacing="3" halign="center" inlineStyle="font-size:1.2em; font-weight:bold; font-family:helvetica,sans-serif;">
<trh:rowLayout id="rl1">
<trh:cellFormat id="cf1">
<af:panelGroupLayout layout="horizontal" id="pgl3">
<af:commandButton text="Custom Fields"
actionListener="#{EditProperties.generateCustomAttributeFields}"
id="cbCustomFields" partialSubmit="true" visible="true"/>
</af:panelGroupLayout>
</trh:cellFormat>
</trh:rowLayout>
</trh:cellFormat>
</trh:rowLayout>
</trh:tableLayout>
</af:panelGroupLayout>
</f:facet>
</af:decorativeBox>
</f:facet>
</af:pageTemplate>
</af:form>
</af:document>
</f:view>
</jsp:root>
コマンドボタンは「カスタムフィールド」であり、クライアントリスナーを介してページで使用したjavascriptで呼び出そうとしています。ただし、ユーザーがこのページをロードすると、ボタンはクリックされず、そのアクション リスナー操作は実行されません。助けてください。