The Widget Package Descriptor"
From Documentation
Tmillsclare (talk | contribs) m (Created page with '{{ZKComponentDevelopmentEssentialsPageHeader}} The Widget Package Descriptor (WPD) is a file describing the information of a package, such as its widget classes and external Jav…') |
Tmillsclare (talk | contribs) m |
||
Line 2: | Line 2: | ||
The Widget Package Descriptor (WPD) is a file describing the information of a package, such as its widget classes and external JavaScript files. WPD must be named zk.wpd and placed in the same directory as the widget classes. For example we would place it under <mp>web/js/com/foo</mp>. | The Widget Package Descriptor (WPD) is a file describing the information of a package, such as its widget classes and external JavaScript files. WPD must be named zk.wpd and placed in the same directory as the widget classes. For example we would place it under <mp>web/js/com/foo</mp>. | ||
+ | |||
Below an example '''zk.wpd''' of our SimpleLabel. | Below an example '''zk.wpd''' of our SimpleLabel. | ||
Line 10: | Line 11: | ||
</package> | </package> | ||
</source> | </source> | ||
+ | |||
The table below describes the elements used within the above XML and their descriptions. | The table below describes the elements used within the above XML and their descriptions. | ||
Line 22: | Line 24: | ||
| The widget class name (without the package name). If the package contains multiple widgets list them one by one | | The widget class name (without the package name). If the package contains multiple widgets list them one by one | ||
|} | |} | ||
+ | |||
Having created the configuration the basic implementation of our component is complete. However it doesn’t have any interactive events. Therefore the next logical step is to start adding events to the component. | Having created the configuration the basic implementation of our component is complete. However it doesn’t have any interactive events. Therefore the next logical step is to start adding events to the component. | ||
{{ZKComponentDevelopmentEssentialsPageFooter}} | {{ZKComponentDevelopmentEssentialsPageFooter}} |
Revision as of 04:47, 14 July 2010
The Widget Package Descriptor (WPD) is a file describing the information of a package, such as its widget classes and external JavaScript files. WPD must be named zk.wpd and placed in the same directory as the widget classes. For example we would place it under web/js/com/foo.
Below an example zk.wpd of our SimpleLabel.
<package name="com.foo" language="xul/html">
<widget name="SimpleLabel"/>
</package>
The table below describes the elements used within the above XML and their descriptions.
Name | Description |
---|---|
package | The root element denotes the package name and the language it belongs to |
widget | The widget class name (without the package name). If the package contains multiple widgets list them one by one |
Having created the configuration the basic implementation of our component is complete. However it doesn’t have any interactive events. Therefore the next logical step is to start adding events to the component.