本文整理了Java中org.zkoss.zk.ui.Execution.encodeURL()
方法的一些代码示例,展示了Execution.encodeURL()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Execution.encodeURL()
方法的具体详情如下:
包路径:org.zkoss.zk.ui.Execution
类名称:Execution
方法名:encodeURL
[英]Encodes an URL.
It resolves "" contained in URI, if any, to the proper Locale, and the browser code. Refer to Servlets#locate(ServletContext,ServletRequest,String,Locator)for details.
[中]对URL进行编码。
它将URI中包含的“”解析为正确的语言环境和浏览器代码(如果有)。有关详细信息,请参阅servlet#locate(ServletContext、ServletRequest、String、Locator)。
代码示例来源:origin: org.zkoss.zk/zk
public String getUpdateURI(String pathInfo) {
final String uri;
if (pathInfo == null || pathInfo.length() == 0) {
uri = _updateURI;
} else {
if (pathInfo.charAt(0) != '/')
pathInfo = '/' + pathInfo;
uri = _updateURI + pathInfo;
}
return _exec.encodeURL(uri);
}
代码示例来源:origin: org.zkoss.zk/zkplus
private String getContextURI() {
if (_exec != null) {
String s = _exec.encodeURL("/");
int j = s.lastIndexOf('/'); //might have jsessionid=...
return j >= 0 ? s.substring(0, j) + s.substring(j + 1) : s;
}
return "";
}
}
代码示例来源:origin: org.zkoss.zk/zk
private static String getContextURI(Execution exec) {
if (exec != null) {
String s = exec.encodeURL("/");
int j = s.lastIndexOf('/'); //might have jsessionid=...
return j >= 0 ? s.substring(0, j) + s.substring(j + 1) : s;
}
return "";
}
代码示例来源:origin: org.zkoss.zk/zuljsp
private static String getContextURI(Execution exec) {
if (exec != null) {
String s = exec.encodeURL("/");
int j = s.lastIndexOf('/'); //might have jsessionid=...
return j >= 0 ? s.substring(0, j) + s.substring(j + 1): s;
}
return "";
}
private static final void writeAttr(Writer out, String name, String value)
代码示例来源:origin: org.zkoss.zk/zkex
protected String getEncodedSrc() {
if (_src == null) {
final Desktop dt = getDesktop();
return dt != null ? dt.getExecution().encodeURL("~./img/spacer.gif"): "";
} else {
StringTokenizer st = new StringTokenizer(_src, ".");
return Utils.getDynamicMediaURI(this, _medver++, st.nextToken(),
_type.equals("jxl") ? "xls": _type);
}
}
/**
代码示例来源:origin: org.zkoss.zk/zul
private List<String> getEncodedSrc() {
final Desktop dt = getDesktop();
List<String> list = new ArrayList<String>();
if (_audio != null) {
list.add(getAudioSrc());
} else if (dt != null) {
for (String src : _src) {
list.add(dt.getExecution().encodeURL(src));
}
}
return list;
}
代码示例来源:origin: org.zkoss.zk/zul
/** Returns the encoded URL of the image (never null).
*/
private String getEncodedURL() {
if (_src != null) {
final Desktop dt = getDesktop();
if (dt != null)
return dt.getExecution().encodeURL(_src);
}
return "";
}
代码示例来源:origin: org.zkoss.zk/zul
private String getEncodedHref() {
final Desktop dt = getDesktop();
return _auxinf != null && _auxinf.href != null && dt != null ? dt.getExecution().encodeURL(_auxinf.href) : null;
//if desktop is null, it doesn't belong to any execution
}
代码示例来源:origin: org.zkoss.zk/zul
private String getEncodedHref() {
final Desktop dt = getDesktop();
return _auxinf != null && _auxinf.href != null && dt != null ? dt.getExecution().encodeURL(_auxinf.href) : null;
//if desktop is null, it doesn't belong to any execution
}
代码示例来源:origin: org.zkoss.zk/zul
private String getEncodedSrcURL() {
if (_src == null)
return null;
final Desktop dt = getDesktop(); //it might not belong to any desktop
return dt != null ? dt.getExecution().encodeURL(_src) : null;
}
代码示例来源:origin: org.zkoss.zk/zul
private String getEncodedHref() {
final Desktop dt = getDesktop();
return _auxinf != null && _auxinf.href != null && dt != null ? dt.getExecution().encodeURL(_auxinf.href) : null;
//if desktop is null, it doesn't belong to any execution
}
代码示例来源:origin: org.zkoss.zkforge/ckez
private String getEncodedURL(String path) {
final Desktop dt = getDesktop(); //it might not belong to any desktop
return dt != null ? dt.getExecution().encodeURL(path): "";
}
代码示例来源:origin: org.zkoss.zk/zhtml
private String getEncodedURL(String src) {
final Desktop dt = getDesktop(); // it might not belong to any desktop
return dt != null ? dt.getExecution().encodeURL(src != null ? src : "~./img/spacer.gif")
: "";
}
代码示例来源:origin: org.zkoss.zk/zk
public void sendRedirect(String uri, String target) {
if (uri != null && uri.length() == 0)
uri = null;
final UiVisualizer uv = getCurrentVisualizer();
uv.setAbortingReason(new AbortBySendRedirect(uri != null ? uv.getExecution().encodeURL(uri) : "", target));
}
代码示例来源:origin: org.zkoss.zk/zk
public String getUpdateURI(boolean encode) {
final String uri = getWebManager().getUpdateURI();
return encode ? Executions.getCurrent().encodeURL(uri) : uri;
}
代码示例来源:origin: org.zkoss.zk/zul
/** Returns the encoded src ({@link #getSrc}).
*/
protected String getEncodedSrc() {
final Desktop dt = getDesktop();
return _media != null ? getMediaSrc()
: //already encoded
dt != null && _src != null ? dt.getExecution().encodeURL(_src) : "";
}
代码示例来源:origin: org.zkoss.zk/zul
private String getEncodedSrc() {
final Desktop dt = getDesktop();
return _media != null ? getMediaSrc()
: //already encoded
dt != null && _src != null ? dt.getExecution().encodeURL(_src) : "";
}
代码示例来源:origin: org.zkoss.zk/zul
/** Returns the encoded URL of the hover image, or null if no hover image.
*/
private String getEncodedHoverURL() {
if (_hoverimg != null)
return Utils.getDynamicMediaURI(this, _hoverimgver, "h/" + _hoverimg.getName(), _hoverimg.getFormat());
final Desktop dt = getDesktop(); //it might not belong to any desktop
return dt != null && _hoversrc != null ? dt.getExecution().encodeURL(_hoversrc) : null;
}
代码示例来源:origin: org.zkoss.zk/zul
/** Returns the encoded URL of the image (never null).
*/
private String getEncodedURL() {
if (_image != null)
return Utils.getDynamicMediaURI( //already encoded
this, _imgver, "c/" + _image.getName(), _image.getFormat());
final Desktop dt = getDesktop(); //it might not belong to any desktop
return dt != null ? dt.getExecution().encodeURL(_src != null ? _src : "~./img/spacer.gif") : "";
}
代码示例来源:origin: org.zkoss.zk/zul
/** Returns the encoded URL for the hover image or null if not
* available.
*/
private String getEncodedHoverURL() {
if (_auxinf != null && _auxinf.hoverimg instanceof Image) {
final Image image = (Image) _auxinf.hoverimg;
return Utils.getDynamicMediaURI(this, _auxinf.hoverimgver, "h/" + image.getName(), image.getFormat());
}
final Desktop dt = getDesktop(); //it might not belong to any desktop
return dt != null && _auxinf != null && _auxinf.hoverimg != null
? dt.getExecution().encodeURL((String) _auxinf.hoverimg) : null;
}
内容来源于网络,如有侵权,请联系作者删除!