Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hook in JSF (ADF Faces) to call page initialization code?

450645Sep 6 2005 — edited Sep 7 2005

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?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2005
Added on Sep 6 2005
3 comments
436 views