I understand we can add actionListener
to commandButton
as:
<h:commandButton value="ClickMe">
<f:actionListener type="com.mycompany.MyActionListener" />
</h:commandButton>
But how can I add an actionListener
to document (entire document, not just body)? The reason I am doing this is when user clicks on anywhere in the page, I want to trigger a method.