How does a ZK Component work

From Documentation
Revision as of 01:02, 8 July 2010 by Tmillsclare (talk | contribs) (Created page with '{{ZKComponentDevelopmentEssentialsPageHeader}} A component and a widget work hand in hand to deliver a rich UI experience to a user. The widget traps the user activity and sends…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


How does a ZK Component work



A component and a widget work hand in hand to deliver a rich UI experience to a user. The widget traps the user activity and sends an appropriate request to the component. The component then interacts with the developer’s Application and responds appropriates telling the widget to update. This interaction is demonstrated in the following diagram.

ZKComDevEss widget component application.png

For example, when an application invokes the setLabel method to change the label of a button component, the setLabel method of corresponding button widget (aka., peer widget) will be invoked at the client to change the visual appearance (as shown below).

ZKComDevEss button labels.png

When the user clicks the button widget, the onClick event will be sent back to the server and notify the application (as demonstrated below).

ZKComDevEss button click.png

In additions to manipulate a component at the server, it is also possible to control a widget at the client. For example, an application may hide or change the order of grid columns at the client, while the application running at the server handles the reloading of the grid’s content. This technique is called Server+client fusion. It can be used to improve responsiveness and reduce network traffic.




Last Update : 2010/07/08

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