Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

auto click java script function for adf command button

448524Aug 24 2009 — edited Nov 30 2011
I am have onLoad function in jspx which tries to get the button and click. But some it is not working. I am not seeing any action listeners/client listener are getting execute.

<?xml version='1.0' encoding='US-ASCII'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=US-ASCII"/>
<f:view>
<trh:html id="html">
<trh:script id="script">

function actionListener(event){
alert("client listener");
}
function callRefreshButton(){
alert("new 1111222");
//var form = document.getElementById("refreshButton");
//form.click();
//top.opener.refreshData();
top.close();
}
</trh:script>
<trh:body id="body" onload="callRefreshButton();">
<af:form id="form1" defaultCommand="refreshButton">
<af:commandButton text="refreshButton" visible="true" partialSubmit="true" id="refreshButton"
actionListener="#{pageFlowScope.taskAction.refreshTaskList}">
<af:clientListener method="actionListener" type="action"/>
</af:commandButton>

</af:form>
</trh:body>
</trh:html>
</f:view>
</jsp:root>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2011
Added on Aug 24 2009
6 comments
9,795 views