I am new to JSF Primefaces
I am using Primeface wizard, where I need to disable/ enable the Next/ Back button in the wizard using java. I have tried with below codes but failed
For Next button disable:
PrimeFaces.current().executeScript(" PF('" + clientId + "').nextNav.css('disabled', 'true');");
PrimeFaces.current().executeScript(" PF('" + clientId + "').nextNav.css('disabled', 'disabled');");
For Next button enable:
PrimeFaces.current().executeScript(" PF('" + clientId + "').nextNav.css('disabled', 'false');");
PrimeFaces.current().executeScript(" PF('" + clientId + "').nextNav.css('disabled', 'none');");
But when I tried with visibility it's working
for Next button hide:
PrimeFaces.current().executeScript(" PF('" + clientId + "').nextNav.css('visibility', 'hidden');");
for Next button show:
PrimeFaces.current().executeScript(" PF('" + clientId + "').nextNav.css('visibility', 'visible');");
Question: How to enable/ disable the Next/ Back button in the wizard using Java snippet? (Need to disable and not to hide the buttons)