For example I would like to enable or disable a button based on data in the backing bean.
The button is created in the JSF file:
<af:commandButton text="Show"
action="#{ClientListPage.showClientDetail}"
partialTriggers="clientListTableId"
disabled="true"
binding="#{ClientListPage.showButton}"/>
And I tried this code in the ClistListPage backing bean:
private CoreCommandButton showButton;
public void setShowButton(CoreCommandButton showButton)
{
this.showButton = showButton;
if (selectedClient != null) showButton.setDisabled(false);
}
However sometimes it works and sometimes it doesn't. Is there another place I could call "if (selectedClient != null) showButton.setDisabled(false);" from which would always get executed just prior to the page being rendered?