Component Properties"
From Documentation
Line 1: | Line 1: | ||
{{ZKDevelopersReferencePageHeader}} | {{ZKDevelopersReferencePageHeader}} | ||
+ | |||
+ | __TOC__ | ||
+ | With [[ZK Developer's Reference/Language Definition/component|component definitions]], we could specify the initial values for the properties, attributes and annotations of a component. | ||
+ | |||
=Properties= | =Properties= | ||
+ | Depending on the requirement, you could change the initial value of a property for a particular ZUML document, or for the whole application. | ||
==Page-wide Initialization== | ==Page-wide Initialization== | ||
+ | Suppose we want to assign <tt>normal</tt> to the border property (<javadoc method="setBorder(java.lang.String)">org.zkoss.zul.Window</javadoc>) of all windows in a ZUML document, then we could use [[ZUML Reference/ZUML/Processing Instructions/component|the component directive]] as follows. | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <?component name="window" extends="window" border="normal"?> | ||
+ | <window title="Border"/> | ||
+ | </source> | ||
+ | |||
==Application-wid Initialization== | ==Application-wid Initialization== | ||
=Molds= | =Molds= | ||
=Attributes= | =Attributes= | ||
+ | Depending on the requirement, you could change the initial value of an attribute for a particular ZUML document, or for the whole application. | ||
+ | ==Page-wide Initialization== | ||
+ | ==Application-wid Initialization== | ||
=Version History= | =Version History= | ||
{{LastUpdated}} | {{LastUpdated}} |
Revision as of 03:03, 30 November 2010
With component definitions, we could specify the initial values for the properties, attributes and annotations of a component.
Properties
Depending on the requirement, you could change the initial value of a property for a particular ZUML document, or for the whole application.
Page-wide Initialization
Suppose we want to assign normal to the border property (Window.setBorder(String)) of all windows in a ZUML document, then we could use the component directive as follows.
<?component name="window" extends="window" border="normal"?>
<window title="Border"/>
Application-wid Initialization
Molds
Attributes
Depending on the requirement, you could change the initial value of an attribute for a particular ZUML document, or for the whole application.
Page-wide Initialization
Application-wid Initialization
Version History
Version | Date | Content |
---|---|---|