tags:

views:

67

answers:

0

In apache trinidad, I have a popup dialog which contains a single selection table and when a row is selected I want to return the value to the calling jsp and close the dialog.

   <tr:table 
    ...
    rowSelection="single"
    selectionListener="#{medicine.selectCode}"
    autoSubmit="true"
    ...

in the backing bean I have the

public void selectCode(SelectionEvent ev) {
...
 RequestContext.getCurrentInstance()
                    .returnFromDialog(selectedCode, null);
...
}

returnFromDialog is supposed to close the dialog but what actually happens is that the dialog is reloaded and remains open. Is there another way to close the dialog?