本文整理了Java中org.zkoss.zk.ui.Execution.getArg()
方法的一些代码示例,展示了Execution.getArg()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Execution.getArg()
方法的具体详情如下:
包路径:org.zkoss.zk.ui.Execution
类名称:Execution
方法名:getArg
[英]Returns the parameters (aka., arg) if #pushArg is called recently, or an empty map if not available.
The use of parameters is application dependent. ZK only provides the way to store ( #pushArg and to restore #popArg. And, let the parameters being accessible in EL by referring it as the arg variable.
Currently, #createComponents(String,Component,Map)and similar methods use this mechanism to let caller customize a page definition.
Notice that #createComponents(String,Component,Map)pops arg after creating components, and before processing any event. In other words, it is not aviable for event listener, including onCreate. However, org.zkoss.zk.ui.event.CreateEvent#getArg preserves the map for its event listeners.
[中]如果最近调用了#pushArg,则返回参数(aka.,arg),如果不可用,则返回空映射。
参数的使用取决于应用程序。ZK只提供了存储(#pushArg)和恢复#popArg.的方法,并且通过将参数引用为arg变量,让参数在EL中可以访问。
目前,#createComponents(String、Component、Map)和类似的方法使用这种机制让调用者自定义页面定义。
注意#createComponents(String,Component,Map)在创建组件之后和处理任何事件之前会弹出arg。换句话说,它不适用于事件侦听器,包括onCreate。然而,组织。zkoss。zk。用户界面。事件CreateEvent#getArg为其事件侦听器保留映射。
代码示例来源:origin: org.zkoss.zk/zk
public Map<?, ?> getArg() {
return exec().getArg();
}
代码示例来源:origin: org.zkoss.zk/zk
private static Implicit beforeInterpret0(Scope scope) {
List<Implicit> impls = _implicits.get();
if (impls == null)
_implicits.set(impls = new LinkedList<Implicit>());
final Implicit impl = new Implicit();
impls.add(0, impl);
final Execution exec = Executions.getCurrent();
impl.setImplicit("arg", exec != null ? exec.getArg() : null);
push(scope);
return impl;
}
代码示例来源:origin: org.zkoss.zk/zkbind
public Object resolveParameter(Annotation anno, Class<?> returnType) {
Object val = _execution.getArg().get(((ExecutionArgParam) anno).value());
return val == null ? null : Classes.coerce(returnType, val);
}
});
代码示例来源:origin: org.zkoss.zk/zuljsp
new CreateEvent(Events.ON_CREATE, _comp, Executions.getCurrent().getArg()));
代码示例来源:origin: org.zkoss.zk/zk
if ("arg".equals(name)) {
final Execution exec = Executions.getCurrent();
return exec != null ? exec.getArg() : null;
代码示例来源:origin: org.zkoss.zk/zk
return _exec.getArg();
if ("componentScope".equals(name)) {
if (self instanceof Component)
代码示例来源:origin: org.zkoss.zk/zkbind
public void doAfterCompose(final T comp) throws Exception {
final Map<?, ?> currentArg = Executions.getCurrent().getArg();
((ComponentCtrl) comp).addCallback(ComponentCtrl.AFTER_PAGE_ATTACHED, new Callback() {
public void call(Object data) {
代码示例来源:origin: org.zkoss.zk/zkbind
public void doBeforeComposeChildren(final Component comp) throws Exception {
final Map<?, ?> currentArg = Executions.getCurrent().getArg();
((ComponentCtrl) comp).addCallback(ComponentCtrl.AFTER_PAGE_ATTACHED, new Callback() {
public void call(Object data) {
代码示例来源:origin: org.zkoss.zk/zk
Events.postEvent(new CreateEvent(Events.ON_CREATE, child, ci.exec.getArg()));
内容来源于网络,如有侵权,请联系作者删除!