I'm trying to open multiple dialog from the same button.
So if I click twice I would got 2 dialog window open.
- I have index.xhtml
- I have janela.xhtml (the dialog page).
on Index.xhtml
Code: Select all
<p:commandButton value="Testing" actionListener="#{janelaBean.showDialogWithAdditionalArg('aa2')}" update="output" ajax="true"/>
Code: Select all
public String showDialogWithAdditionalArg(String oid) {
Map<String, Object> properties = new HashMap<>();
properties.put("modal", false);
properties.put("id", "aaff"+oid);
properties.put("name", "aaff"+oid);
properties.put("widgetVar", "aaff"+oid);
properties.put("resizable", true);
properties.put("draggable", true);
properties.put("minimizable", true);
properties.put("maximizable", true);
properties.put("closeOnEscape", true);
properties.put("width", 400);
properties.put("height", 400);
RequestContext.getCurrentInstance().openDialog("Janela", properties, null);
return "";
}
Is there a right way to do that?
thanks a lot