0
votes

My question is simialr to selectOneMenu ajax events


My code:

<p:selectOneMenu style="width:150px" editable="true"
                                            value="#{Bean.xxx}">
                                            <p:ajax event="change"
                                                listener="#{Bean.showSearchPopup}"
                                                async="false" update=":actualexppop" />

                                        </p:selectOneMenu>


My Backing Bean code :

     public void showPrismsiSearchPopup(final AjaxBehaviorEvent event) {
                if (xxx!= null && xxx.length() > 0) {
    //Going to DB for getting some list value to show in the Datatable which is located in the pop up.
    }
            RequestContext context = RequestContext.getCurrentInstance();
//Dialogue is getting called below              
context.execute("xxxdlg.show()");

            }


My problem is

Say, If I provide the value of the editable p:selectonemenu as "test" and then I am selecting the drop down to show the dialogue which is called from the backing bean.The dialogue is getting displayed for the first time for the value "test" and if I close the dialogue and select the p:selectonemenu with the same value "test" the dialogue is not shown.

Simply ,the dialogue is shown only for the first time, not for the second time with the same value provided in.

If I keep changing the values the Dialogue is opening correctly.

How to make the dialogue to shown each time though the seletmenu has same value ?

1

1 Answers

1
votes

If you select the same option then change event is not called. You can try to unset value="#{Bean.xxx}" so that next time you select "test" again change event is propagated.