I can't open dialog framework form more than once on a page in firefox unless I refresh the page .
In firefox ,after page load,I can click the command button and open dialog framework form.It works fine.But after I choose the data and return back,I can't open the dialog form again when I click the command button.
If I refresh the page,it works again,but only once.
Same code in chrome and Safari is OK.
How can I do to solve this problem.
JSF
Code: Select all
<p:column>
<p:inputText id="vendor" value="#{purchaseDraftManagedBean.currentEntity.vendor.vendor}" title="vendor"
styleClass="inputWithButton" disabled="true"/>
<p:commandButton id="btnSelectVendor" actionListener="#{purchaseDraftManagedBean.openDialog('vendorSelect')}" icon="ui-icon-extlink"
process="@this" >
<p:ajax event="dialogReturn" listener="#{purchaseDraftManagedBean.handleDialogReturnVendorWhenEdit}"
update="vendor"/>
</p:commandButton>
</p:column>
Code: Select all
public void openDialog(String view) {
Map<String, Object> options = new HashMap<>();
options.put("modal", true);
try {
RequestContext.getCurrentInstance().openDialog(view, options, null);
} catch (Exception e) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(null, e.getMessage()));
}
}
public void handleDialogReturnVendorWhenEdit(SelectEvent event) {
if (event.getObject() != null) {
Vendor entity = (Vendor) event.getObject();
this.currentEntity.setVendor(entity);
}
}