Skip to Main Content

Programming Languages & Frameworks

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Problem with displaying "rendered" buttons

Eugen LangJun 28 2023

Such a problem. I have a page that opens when this button is clicked.

<af:link text="#{labels['by.compit.belpost.ot.delivery.menu.NotAssigned_LABEL']}"
id="l3" inlineStyle="font-size:larger; font-weight:bold; color:Black;"
action="#{pageFlowScope.DeliveryMainPageBean.showNotAssignedTop}"/>

I have two buttons in the menu bar on this page, the code is below.

<af:commandMenuItem text="First mail" id="cmi13"
action="#{pageFlowScope.NotificationsBean.printUnsentMainNotifications}"
rendered="#{pageFlowScope.DeliveryMainPageBean.show}"/>
<af:commandMenuItem text="Second mail" id="cmi14"
action="#{pageFlowScope.NotificationsBean.printUnsentSecondaryNotifications}"
rendered="#{pageFlowScope.DeliveryMainPageBean.showTwo}"/>

These two buttons will be displayed if the condition from the method below is met

public boolean isShow() {
return showPS22primary == 1;
}

public boolean isShowTwo() {
return showPS22second == 1;
}

variables showPS22primary and showPS22second are initialized and evaluated in the method that opens this page:

public String showNotAssignedTop() {
showPS22primary=0;
showPS22second=0;
topNodeSelected(DeliveryNotAssignedItem.class);
if(showPS22primary == 0){
showPS22primary = (Integer) ADFBindingsUtil.executeOperationBinding("isShow");
if(showPS22primary >0){
showPS22primary=1;
}else{
showPS22primary=2;
}
showPS22second=(Integer) ADFBindingsUtil.executeOperationBinding("isShowTwo");
if(showPS22second >0){
showPS22second=1;
}else{
showPS22second=2;
}
}
return null;
}

The problem is that these two buttons appear and disappear even when the page is refreshed. Although in the database the value does not change. But there is no button. How to fix it? Is it possible that the request is processed for a long time and the program code goes further?

Comments
Post Details
Added on Jun 28 2023
0 comments
304 views