Code: Select all
if(!FacesContext.getCurrentInstance().isPostback()) {
Map<String, Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("draggable", true);
options.put("resizable", true);
options.put("contentHeight", "'100%'");
options.put("contentWidth", "'100%'");
options.put("height", "370");
options.put("width", "700");
Map<String, Object> params = new HashMap<String, Object>();
FacesContext.getCurrentInstance().getExternalContext().getSessionMap()
.put("value", params);
RequestContext.getCurrentInstance().openDialog("dialogScreen.xhtml",
options, null);
Code: Select all
RequestContext.getCurrentInstance().showMessageInDialog(new FacesMessage("This is a message"));