Currently utilizing the ADF program. Encountered an issue where this javascript code is functional in the .JSF file but not in the .JSFF file. Seeking guidance on potential solutions to address this problem.
<?xml version='1.0' encoding='UTF-8'?>
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<f:view>
<af:document title="Test.jsff" id="d1">
<af:resource type="javascript">
function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML = h + ":" + m + ":" + s;
t = setTimeout('startTime()', 500);
}
function checkTime(i) {
if (i < 10) {
i = "0" + i;
}
return i;
}
</af:resource>
<af:form id="f1">
<af:outputText value="outputText1" id="txt">
<af:clientListener method="startTime()" type="propertyChange"/>
</af:outputText>
</af:form>
</af:document>
</f:view>
</ui:composition>