Most used api for Implicit Objects and Static Classes

From Documentation
Documentationost used api for Implicit Objects and Static Classes
ost used api for Implicit Objects and Static Classes

Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


Besides setAttribute, getAttribute. We will list some useful api of implicit object and Static Classes like Executions and Path. For more information, please refer to their javadoc. They are all under package org.zkoss.zk.ui.



setVisible : Sets whether this component is visible.
setParent : Sets the parent component.
removeChild : Removes a child.

Because self will be cast to evaluating component, therefore its api is not limited to org.zkoss.zk.ui.Component.

For example

<tab label="OnDemand" onSelect="load(self.linkedPanel)"/>

linkedPanel is mapping to getLinkedPanel of



In most case, it will be cast to window.





enableServerPush : to enable server push
setBookmark : Sets a bookmark to this desktop.
getBookmark : Returns the current bookmark (never null).



getArg : Returns the parameters (aka., arg) if pushArg is called recently.
getParameter : Returns the value of a request parameter as a String. a example



setAttribute : Sets the value of the specified custom attribute.
getAttribute : Returns the value of the specified custom attribute
getNativeSession : Returns the native session.
getRemoteAddr : Returns the Internet Protocol (IP) address of the client or last proxy that sent the first request creating this session.
getDeviceType : Returns the device type that this session belongs to.

In most cases, we use session to setAttribute and getAttribute.



getConfiguration : Returns the configuration.
getInitParameter : Returns the value of the named context-wide initialization parameter.


org.zkoss.zk.ui.event.Event or derived

stopPropagation : Stops the propagation for this event.
getTarget : Returns the target component that receives this event.
getName : Returns the event name.
getData : Returns the data accompanies with this event.

event may be casted to subclass like KeyEvent, InputEvent.



createComponents : Creates components from a page file specified by an URI.
getCurrent : Returns the current execution.
getCurrent().getParameter : Returns the value of a request parameter as a String
forward : A shortcut of Executions.getCurrent().forward(page).
sendRedirect : Sends a temporary redirect response to the client using the specified redirect location URL.
wait : Suspends the current processing of an event and wait notify for the specified object.
notify : Wakes up a single event processing thread that is waiting on the specified object.
activate : Activates a server-push thread.
deactivate : Deactivates a server-push thread.



getComponent : Returns the component of the specified path



evalJavaScript: Asks the browser to evaluate the specified JavaScript.
scrollIntoView: Scrolls the ancestor elements to make the specified element visible.
showBusy: Shows the busy message at the brower such that the user knows the system is busy.

Last Update : 2022/01/20

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