arg"

From Documentation
(Created page with '== arg - java.util.Map == The <tt>arg</tt> argument passed to the <tt>createComponents</tt> method in the <tt>org.zkoss.zk.ui.Executions</tt> class. It might be <tt>null</tt>, de…')
 
Line 1: Line 1:
 
== arg - java.util.Map ==
 
== arg - java.util.Map ==
The <tt>arg</tt> argument passed to the <tt>createComponents</tt> method in the <tt>org.zkoss.zk.ui.Executions</tt> class. It might be <tt>null</tt>, depending on how <tt>createComponents</tt> is called.
+
The <tt>arg</tt> argument passed to the <tt>createComponents</tt> method in the <javadoc>org.zkoss.zk.ui.Executions</javadoc> class. It might be <tt>null</tt>, depending on how <tt>createComponents</tt> is called.
  
 
It is the same as self.desktop.execution.arg.
 
It is the same as self.desktop.execution.arg.
Line 15: Line 15:
 
</source>
 
</source>
  
Notice that <tt>arg</tt> is available only when creating the components for the included page, say <tt>my.zul</tt>. On the other hand, all events, including <tt>onCreate</tt>, are processed later. Thus, if you want to access <tt>arg</tt> in the <tt>onCreate</tt>'s listener, use the <tt>getArg</tt> method of the <tt>org.zkoss.zk.ui.event.CreateEvent</tt> class.
+
Notice that <tt>arg</tt> is available only when creating the components for the included page, say <tt>my.zul</tt>. On the other hand, all events, including <tt>onCreate</tt>, are processed later. Thus, if you want to access <tt>arg</tt> in the <tt>onCreate</tt>'s listener, use the <tt>getArg</tt> method of the <javadoc>org.zkoss.zk.ui.event.CreateEvent</javadoc> class.
 
[[Category:Implicit Objects]]
 
[[Category:Implicit Objects]]
 
[[Category:The ZK User Interface Markup Language]]
 
[[Category:The ZK User Interface Markup Language]]

Revision as of 04:30, 9 July 2010

arg - java.util.Map

The arg argument passed to the createComponents method in the Executions class. It might be null, depending on how createComponents is called.

It is the same as self.desktop.execution.arg.

params.put("name", "John");
Executions.createComponents("/my.zul", null, params);

Then, in my.zul,

<window title="${arg.name}">

Notice that arg is available only when creating the components for the included page, say my.zul. On the other hand, all events, including onCreate, are processed later. Thus, if you want to access arg in the onCreate's listener, use the getArg method of the CreateEvent class.