Chapter 4: Controlling Components"

From Documentation
(Created page with " = Control in Zscript = * pro * good for prototype * explain example usage = Control in Controller = * what is composer * how to apply it on a zul * initialize in doAftercompo...")
 
Line 1: Line 1:
 +
 +
ZK's Components are not just only for constructing user interface, we even can control them. In this chapter, we continue to use the last chapter's example but we remove 3 item's hyper links in the sidebar and replace them with redirecting action. To achieve this, we should write codes in Java for each item to response a user's clicking and redirect the user to an external site.
  
 
= Control in Zscript =
 
= Control in Zscript =
 +
<!--
 
* pro
 
* pro
 
* good for prototype
 
* good for prototype
 
* explain example usage
 
* explain example usage
 
+
-->
 +
The simplest way to response a user's clicking is
  
 
= Control in Controller =
 
= Control in Controller =

Revision as of 08:36, 11 January 2013

ZK's Components are not just only for constructing user interface, we even can control them. In this chapter, we continue to use the last chapter's example but we remove 3 item's hyper links in the sidebar and replace them with redirecting action. To achieve this, we should write codes in Java for each item to response a user's clicking and redirect the user to an external site.

Control in Zscript

The simplest way to response a user's clicking is

Control in Controller

  • what is composer
  • how to apply it on a zul
  • initialize in doAftercomposer()
  • dynamic create components
  • event listener