Implementing the Component

From Documentation
Revision as of 02:26, 8 July 2010 by Tmillsclare (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Implementing the Component



As previously mentioned a ZK Component consists of a server-side component usually written in Java and a client based widget written in JavaScript. Firstly let’s discuss the creation of the server-side component.

The component’s Java class must extend AbstractComponent or one of its derivative classes. There are several derived classes all providing different levels of functionality. The derived classes are shown below.

ZKComDevEss component hierarchy.png


For tutorial purpose, we use HtmlBasedComponent, which is the base class for HTML-based component.

To implement a component class, we need to decide on

  • The class name. Let’s name it com.foo.SimpleLabel
  • The properties to support. In this case, we'd like to implement a property called value, which is the visual content at the client.

Let’s investigate the component properties.




Last Update : 2010/07/08

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