Implementing the Component

From Documentation

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
  • 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.

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