OFBiz Tree widgets are widgets that automatically generate HTML unordered lists (HTML ul
and li
markup tags) from the specified database content and/or other XML declarations.
Tree widgets are defined in Tree widget definition files that have an XML XSD declaration as follows. Tree widget definition files may be located anywhere within an OFBiz install:
<trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "http://ofbiz.apache.org/dtds/widget-tree.xsd"> </trees>
Tree widgets can be added by the following steps:
tree name
and a root-node-name
attribute. The root-node-name
is a trigger to OFBiz to create an HTML ul
markup tag. node
element. node
and sub-node
elements.<include-tree name="MyTree" />
Tree widgets create HTML by taking the XML widget declarations and merging those declarations with any specified database values to create the corresponding HTML. Tree widgets build one or more HTML unordered lists (ul
) with associated list tags, HTML styling, and hyperlinks. For example:
Basic tree | |
---|---|
XML |
<tree name="mytree" root-node-name="first-node" > <node name="first-node"> </node> </tree> |
HTML |
<ul class="basic-tree"> <li> <a class="leafnode"> </a> </li> </ul> |
18.118.9.197