Adding and modifiying Webtop (or other WDK application) browsertree nodes is done by customizing the browsertree component. To achieve this, you must do the following:
In Webtop custom layer, in config folder (or its subfolder, according to your structure) create a new file browsertree_component.xml (or find the existing one), which will override the brosertree component configuration. Here's a sample of how the configuration should look like:
<config version="1.0">
<scope>
<component modifies="browsertree:webtop/config/browsertree_component.xml">
<insertafter path="nodes.docbasenodes.node[componentid=inboxclassic]">
<node componentid="custom_node">
<icon>customicon_16.gif</icon>
<label>Custom Node</label>
</node>
</insertafter>
<!-- below optional parts -->
<replace path="pages.start">
<start>/custom/webtop/browsertree.jsp</start>
</replace>
<replace path="nlsbundle">
<nlsbundle>com.package.custom.BrowserTreeNlsProp</nlsbundle>
<replace>
</component>
</scope>
</config>
In this example we modify the browsertree component configuration from webtop layer by inserting a new node after the node inboxclassic. Our node will display the "custom_node" component, which must be a WDK component. We also replaced the browsertree standard jsp layout with out custom jsp. Finally, we've defined a custom NLS resource bundle for localizable strings.
Note that we've used definition modification (introduced in WDK 6.x), but the same result can be achieved by extending the component definition from parent layer (although it usually requires copying big xml parts from parent definition).
In Webtop custom layer, in config folder (or its subfolder, according to your structure) create a new file browsertree_component.xml (or find the existing one), which will override the brosertree component configuration. Here's a sample of how the configuration should look like:
<config version="1.0">
<scope>
<component modifies="browsertree:webtop/config/browsertree_component.xml">
<insertafter path="nodes.docbasenodes.node[componentid=inboxclassic]">
<node componentid="custom_node">
<icon>customicon_16.gif</icon>
<label>Custom Node</label>
</node>
</insertafter>
<!-- below optional parts -->
<replace path="pages.start">
<start>/custom/webtop/browsertree.jsp</start>
</replace>
<replace path="nlsbundle">
<nlsbundle>com.package.custom.BrowserTreeNlsProp</nlsbundle>
<replace>
</component>
</scope>
</config>
In this example we modify the browsertree component configuration from webtop layer by inserting a new node after the node inboxclassic. Our node will display the "custom_node" component, which must be a WDK component. We also replaced the browsertree standard jsp layout with out custom jsp. Finally, we've defined a custom NLS resource bundle for localizable strings.
Note that we've used definition modification (introduced in WDK 6.x), but the same result can be achieved by extending the component definition from parent layer (although it usually requires copying big xml parts from parent definition).
I have read your article, it is very informative and helpful for me.I admire the valuable information you offer in your articles. Thanks for posting it..
ReplyDeleteหนังออนไลน์