org.zkoss.zk.ui.Execution.toAbsoluteURI()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(143)

本文整理了Java中org.zkoss.zk.ui.Execution.toAbsoluteURI()方法的一些代码示例,展示了Execution.toAbsoluteURI()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Execution.toAbsoluteURI()方法的具体详情如下:
包路径:org.zkoss.zk.ui.Execution
类名称:Execution
方法名:toAbsoluteURI

Execution.toAbsoluteURI介绍

[英]Converts the specified URI to an absolute URI, if uri is related and the current execution is not included ( #isIncluded).

Note: an asynchronous update is processed by the update servlet. It is different from the servlet for rendering the ZUML page. In other words, a relative URI won't be interpreted correctly, so you have to invoke this method to convert them if necessary.

In additions, RequestDispatcher.include doesn't handle related URI well.
[中]如果URI相关且未包含当前执行(#ISinclude),则将指定的URI转换为绝对URI。
注意:异步更新由更新servlet处理。它不同于用于呈现ZUML页面的servlet。换句话说,相对URI将无法正确解释,因此必须在必要时调用此方法来转换它们。
此外,RequestDispatcher。include不能很好地处理相关的URI。

代码示例

代码示例来源:origin: org.zkoss.zk/zk

/** Converts the specified URI to absolute if necessary.
 * Refer to {@link org.zkoss.zk.ui.Execution#toAbsoluteURI}.
 *
 * @param skipInclude whether not to convert to an absolute URI if
 * the current page is included by another page.
 * When use the include directive, skipInclude shall be true.
 */
public static String toAbsoluteURI(String uri, boolean skipInclude) {
  return Executions.getCurrent().toAbsoluteURI(uri, skipInclude);
}

代码示例来源:origin: org.zkoss.zk/zk

public String toAbsoluteURI(String uri, boolean skipInclude) {
  return exec().toAbsoluteURI(uri, skipInclude);
}

代码示例来源:origin: org.zkoss.zk/zkex

.getResourceAsStream(exec.toAbsoluteURI(_src, false));
if (is == null) {// try to load by class loader
  is = Thread.currentThread().getContextClassLoader()

代码示例来源:origin: org.zkoss.zk/zul

private void include(Writer out) throws IOException {
  final Desktop desktop = getDesktop();
  final Execution exec = getExecution();
  final String src = exec.toAbsoluteURI(_src, false);
  final Map<String, Object> old = setupDynams(exec);
  ComponentRedraws.beforeRedraw(true); //starting a new page

相关文章