The web-app-class Element"
From Documentation
m (Created page with '{{ZKConfigurationReferencePageHeader}} =Version History= {{LastUpdated}} {| border='1px' | width="100%" ! Version !! Date !! Content |- | | | |} {{ZKConfig…') |
m |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{ZKConfigurationReferencePageHeader}} | {{ZKConfigurationReferencePageHeader}} | ||
+ | |||
+ | '''Syntax:''' | ||
+ | <web-app-class>''a_class_name''</web-app-class> | ||
+ | |||
+ | [Default: <javadoc>org.zkoss.zk.ui.http.SimpleWebApp</javadoc>] | ||
+ | |||
+ | It specifies which class is used to implement the Web application. The class must have a default constructor (without any argument), and implement both the <javadoc type="interface">org.zkoss.zk.ui.WebApp</javadoc> and <javadoc type="interface">org.zkoss.zk.ui.sys.WebAppCtrl</javadoc> interfaces. Instead of implementing from scratch, you can extend it from the <javadoc>org.zkoss.zk.ui.impl.AbstractWebApp</javadoc> or <javadoc>org.zkoss.zk.ui.http.SimpleWebApp</javadoc> classes. | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <system-config> | ||
+ | <web-app-class>foo.MyKillerApp</web-app-class> | ||
+ | </system-config> | ||
+ | </source> | ||
+ | |||
+ | Alternatively, you could use [[ZK Configuration Reference/zk.xml/The system-config Element/The web-app-factory-class Element|the web-app-factory-class element]] instead. Notice, if both specified, [[ZK Configuration Reference/zk.xml/The system-config Element/The web-app-factory-class Element|the web-app-factory-class element]] has the higher priority. | ||
=Version History= | =Version History= |
Latest revision as of 01:50, 8 September 2011
Syntax:
<web-app-class>a_class_name</web-app-class>
[Default: SimpleWebApp]
It specifies which class is used to implement the Web application. The class must have a default constructor (without any argument), and implement both the WebApp and WebAppCtrl interfaces. Instead of implementing from scratch, you can extend it from the AbstractWebApp or SimpleWebApp classes.
<system-config>
<web-app-class>foo.MyKillerApp</web-app-class>
</system-config>
Alternatively, you could use the web-app-factory-class element instead. Notice, if both specified, the web-app-factory-class element has the higher priority.
Version History
Version | Date | Content |
---|---|---|