Apache Click provides a rich set of Controls which support client side rendering and server side processing. Please see the Javadoc, which provides extensive information and examples of the core Controls.
This chapter covers Control in detail including the Control life cycle, Control listeners and localization.
Controls provide the server side components that process user input, and render their display to the user. Controls are equivalent to Visual Basic Controls or Delphi Components.
Controls handle the processing of user input in the onProcess method and render their HTML display using the toString() method. The execution sequence for a Control being processed and rendered is illustrated in the figure below.
In Click all control classes must implement the Control interface. The Control interface is depicted in the figure below.
Methods on the Control interface include:
getHeadElements() - defines the controls HTML header imports.
getMessages() - defines the controls localized messages map.
onDeploy() - deploy resources on startup.
onInit() - on initialize event handler.
onProcess() - process request event handler.
onDestroy() - on destroy event handler.
render() - generate the control's HTML representation.