oracle-adf

Popup does not show when the button is clicked second time in Oracle ADF


When clicking on a button for the first time the popup is showing up, but from the second click onwards, the popup doesn't show up.

<af:popup id="p1" contentDelivery="lazyUncached" autoCancel="diabled">
  <af:dialog type="yesNo" title="" dialogListner="pageflowScope.testBean.popupListner>
    <af:panelGroupLayout id="pg15" layout="scroll">
    <af:panelGroupLayout id="pg15" layout="vertical">
       <af:outputText value="Do you want to save the document?" id="ot2">
    </af:panelGroupLayout>
    </af:panelGroupLayout>
  </af:dialog>
</af:popup>
public void saveActionListner(ActionEvent actionEvent){
   RichPopup popup = (RichPopup) JSFUtils.findComponentInRoot("p1");
   popup.show(new RichPopup.popupHints);
<af:commandButton text="save" id="cb1" actionListner="#{pageflowScope.testBean.saveActionListner} action="#{pageflowScope.testBean.outcome}" partialTriggers="#{pageflowScope.testBean.updatedStatus}" partialSubmit="true">
  </af:commandButton>

Solution

  • Why do you use an actionListerner and an action on the command button? The actionListener should be enough.

    It doesn't make sense to show a popup and navigate away directly afterward. Remove the action from the button and see if this fixes the problem.

    If you still have the same problem, check the log files for any errors. You should look into the browser console too and check for JavaScript errors there.