arg

From Documentation
Revision as of 01:14, 8 July 2010 by Maya001122 (talk | contribs) (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…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

arg - java.util.Map

The arg argument passed to the createComponents method in the org.zkoss.zk.ui.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 org.zkoss.zk.ui.event.CreateEvent class.