The scenario looks like this:
There are two buttons in the screen, say button1 and button2. On page load, button2 is disabled. When the user clicks button1, button2 will be enabled. I achieved this functionality using javascript window.onload event, and onclick event on button1. My problem is, when the user clicks button1 it triggers a page reload. With that being said, after the reload of the page, button2 is disabled because of the onload event.
Is there another way to achieved this functionality?
By the way I'm using primefaces.