<h:commandButton id="button1" value="" action="#{bean.refresh}"/>
this button needs to hide and execute refresh method when it click from javascript.i tried with rendered attribute but action not calling
javascript is
document.getElementByid("button1"").click();