org.zkoss.zk.ui.metainfo.page.Loader.class"
From Documentation
(Created page with ' {{ZKConfigurationReferencePageHeader}} Default: <i>none</i> [since 5.0.4] It specifies the name of the class used to load the page definitions. The class must implement the …') |
m ((via JWB)) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ZKConfigurationReferencePageHeader}} | {{ZKConfigurationReferencePageHeader}} | ||
+ | '''Property:''' | ||
+ | org.zkoss.zk.ui.metainfo.page.Loader.class | ||
+ | |||
+ | {{GlobalLibraryProperty}} | ||
Default: <i>none</i> | Default: <i>none</i> | ||
− | + | {{versionSince|5.0.4}} | |
It specifies the name of the class used to load the page definitions. The class must implement the <javadoc>org.zkoss.util.resource.Loader</javadoc> interface and it must have a constructor as follows. | It specifies the name of the class used to load the page definitions. The class must implement the <javadoc>org.zkoss.util.resource.Loader</javadoc> interface and it must have a constructor as follows. | ||
Line 36: | Line 40: | ||
</source> | </source> | ||
− | {{ZKConfigurationReferencePageFooter}} | + | =Version History= |
+ | {{LastUpdated}} | ||
+ | {| border='1px' | width="100%" | ||
+ | ! Version !! Date !! Content | ||
+ | |- | ||
+ | | 5.0.4 | ||
+ | | August 2010 | ||
+ | | '''org.zkoss.zk.ui.metainfo.page.Loader.class''' | ||
+ | It specifies the name of the class used to load the page definitions. | ||
+ | |} | ||
+ | {{ZKConfigurationReferencePageFooter}} |
Latest revision as of 09:34, 14 March 2022
Property:
org.zkoss.zk.ui.metainfo.page.Loader.class
Applicable: globally in zk.xml via <library-property> not as <custom-attribute>
Default: none
Since 5.0.4
It specifies the name of the class used to load the page definitions. The class must implement the Loader interface and it must have a constructor as follows.
public FooLoader(org.zkoss.zk.ui.WebApp wapp) { //assume FooLoader is the implementation class
...
The default iimplementation is straightforward:
private static class MyLoader extends org.zkoss.web.util.resource.ResourceLoader {
private final WebApp _wapp;
private MyLoader(WebApp wapp) {
_wapp = wapp;
}
//-- super --//
protected Object parse(String path, File file, Object extra)
throws Exception {
final Locator locator =
extra != null ? (Locator)extra: getLocator(_wapp, path);
return new Parser(_wapp, locator).parse(file, path);
}
protected Object parse(String path, URL url, Object extra)
throws Exception {
final Locator locator =
extra != null ? (Locator)extra: getLocator(_wapp, path);
return new Parser(_wapp, locator).parse(url, path);
}
}
Version History
Version | Date | Content |
---|---|---|
5.0.4 | August 2010 | org.zkoss.zk.ui.metainfo.page.Loader.class
It specifies the name of the class used to load the page definitions. |