private void setRenderJsonContenTypeIE(final String contentType) { if (H.Format.JSON.contentType().equalsIgnoreCase(contentType)) { renderJsonIeFix = false; return; } renderJsonIeFix = true; jsonIE = H.Format.of("json_ie", contentType); jsonContentTypeProvider = new $.Func0<H.Format>() { @Override public H.Format apply() throws NotAppliedException, $.Break { ActionContext context = ActionContext.current(); if (null != context) { UserAgent ua = context.userAgent(); if (ua.isIE()) { return jsonIE; } } return H.Format.JSON; } }; }
private void setRenderJsonContenTypeIE(final String contentType) { if (H.Format.JSON.contentType().equalsIgnoreCase(contentType)) { renderJsonIeFix = false; return; } renderJsonIeFix = true; jsonIE = H.Format.of("json_ie", contentType); jsonContentTypeProvider = new $.Func0<H.Format>() { @Override public H.Format apply() throws NotAppliedException, $.Break { ActionContext context = ActionContext.current(); if (null != context) { UserAgent ua = context.userAgent(); if (ua.isIE()) { return jsonIE; } } return H.Format.JSON; } }; }
public static H.Format contentType(String path) { H.Format retVal = null; if (path.contains(".")) { FastStr s = FastStr.unsafeOf(path).afterLast('.'); retVal = H.Format.of(s.toString()); } return null == retVal ? H.Format.BINARY : retVal; }
accept = H.Format.JSON.contentType(); } else { H.Format format = H.Format.of(accept); if (null == format) { format = H.Format.resolve(accept);
accept = H.Format.JSON.contentType(); } else { H.Format format = H.Format.of(accept); if (null == format) { format = H.Format.resolve(accept);
accept = H.Format.JSON.contentType(); } else { H.Format format = H.Format.of(accept); if (null == format) { format = H.Format.resolve(accept);
public static H.Format contentType(String path) { H.Format retVal = null; if (path.contains(".")) { FastStr s = FastStr.unsafeOf(path).afterLast('.'); retVal = H.Format.of(s.toString()); } return null == retVal ? H.Format.BINARY : retVal; }