arg"

From Documentation
m
m
Line 1: Line 1:
 
{{ZUMLReferencePageHeader}}
 
{{ZUMLReferencePageHeader}}
  
== arg - java.util.Map ==
+
= arg - java.util.Map =
 
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.
 
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.
  
Line 19: Line 19:
 
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.
 
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.
  
==Version History==
+
=Version History=
  
 
{| border='1px' | width="100%"
 
{| border='1px' | width="100%"

Revision as of 11:25, 18 November 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.

Version History

Version Date Content
     



Last Update : 2010/11/18

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.