I'm trying to click a button after the page loading to open a pop up window with some information:
<script type="text/javascript">
function doHiddenClickPuntoAgua() {
document.getElementById("form:puntoAgua").click();
}
</script>
<p:commandButton id="puntoAgua"
actionListener="#{viewGestionBean.openDialogAgua()}"
style="display: none;">
<p:ajax event="dialogReturn"
listener="#{gestionBean.actualizaTabla()}"
update=":form:tablaUbicaciones" />
</p:commandButton>
I see that the function is calling from then backbean but the actionListener not working in my command button why?