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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Disable CommandToolbarButton programmatically

User_FU6JNAug 6 2021

Hi ,
I'm using JDeveloper 11.1.1.7.0
I have defined a button like this:
<af:commandToolbarButton id="launchButton"
text="#{uiBundle.LAUNCH}"
actionListener="#{LaunchPlanBean.planDialogSetUp}"
accessKey="L"
binding="#{KanbanPlanBean.planReadOnly}">
<af:showPopupBehavior popupId="launchPopup"
triggerType="click"/>
</af:commandToolbarButton>
In some conditions, I need to disable the button programmatically. I've tried this:
RichCommandToolbarButton readOnly;
....
....
readOnly.setdisable(true);
My issue is that, when running the page, it seems to work and button shows disabled with my right conditions.
But, if I click on the disabled button, popup appears. I have tried this with RichCommandButton and it is working fine but not with RichCommandToolbarButton.

How can I solve this?

Thanks & Regards

This post has been answered by Timo Hahn on Aug 9 2021
Jump to Answer

Comments

Post Details

Added on Aug 6 2021
6 comments
271 views