/** * Close the current dynamic dialog. * * @param data optional data to pass back to a dialogReturn event. */ public void closeDynamic(Object data) { FacesContext facesContext = getFacesContext(); Map<String, String> params = facesContext.getExternalContext().getRequestParameterMap(); String pfdlgcid = ComponentUtils.escapeEcmaScriptText(params.get(Constants.DIALOG_FRAMEWORK.CONVERSATION_PARAM)); if (data != null) { Map<String, Object> session = facesContext.getExternalContext().getSessionMap(); session.put(pfdlgcid, data); } executeScript("PrimeFaces.closeDialog({pfdlgcid:'" + pfdlgcid + "'});"); }
url = ComponentUtils.escapeEcmaScriptText(url); pfdlgcid = UUID.randomUUID().toString(); pfdlgcid = ComponentUtils.escapeEcmaScriptText(pfdlgcid); sb.append("'").append(ComponentUtils.escapeEcmaScriptText((String) optionValue)).append("'");
private void addShareProperty(final WidgetBuilder wb, final String property, final String value) throws IOException { if (value != null) { wb.append(property); wb.append(":\""); wb.append(ComponentUtils.escapeEcmaScriptText(value)); wb.append("\""); } }
public WidgetBuilder attr(String name, String value, String defaultValue) throws IOException { if (value != null && !value.equals(defaultValue)) { ResponseWriter rw = context.getResponseWriter(); rw.write(","); rw.write(name); rw.write(":\""); rw.write(ComponentUtils.escapeEcmaScriptText(value)); rw.write("\""); } return this; }
public WidgetBuilder attr(String name, String value) throws IOException { if (value != null) { ResponseWriter rw = context.getResponseWriter(); rw.write(","); rw.write(name); rw.write(":\""); rw.write(ComponentUtils.escapeEcmaScriptText(value)); rw.write("\""); } return this; }