View"
From Documentation
Line 3: | Line 3: | ||
The view is the UI of an application. It totally depends on the application's requirements. | The view is the UI of an application. It totally depends on the application's requirements. | ||
− | As described in [[ZK Developer's Reference/MVC/Model| | + | As described in [[ZK Developer's Reference/MVC/Model|MVC/Model]], some ZK components supports Model-driven rendering, such as <javadoc>org.zkoss.zul.Listbox</javadoc>. There are two approaches you can customize the rendering of each item in a model: |
+ | |||
+ | * [[ZK Developer's Reference/MVC/View/Template|Template]]: you define a template which is a fragment of the ZUML document to define how to render each item. | ||
+ | |||
+ | * [[ZK Developer's Reference/MVC/View/Renderer|Renderer]]: you create a Java class that implements a specific interface to render each item. | ||
+ | |||
− | |||
{{ZKDevelopersReferenceHeadingToc}} | {{ZKDevelopersReferenceHeadingToc}} |
Revision as of 06:20, 22 October 2021
The view is the UI of an application. It totally depends on the application's requirements.
As described in MVC/Model, some ZK components supports Model-driven rendering, such as Listbox. There are two approaches you can customize the rendering of each item in a model:
- Template: you define a template which is a fragment of the ZUML document to define how to render each item.
- Renderer: you create a Java class that implements a specific interface to render each item.