Products
About Guided Tour Online Demo Trial Version Requirements
Resources
Documents Configuration examples TagLib Reference Useful Links
Customer Support
Updates Forums Contact Services
Sales
Licensing Sales FAQ Buy Online
 
 
 
buy online   |   about us   |   german version  

» Configuration examples TreeControl

Examples: 1 | 2 | 3 | 4 | 5

Configuration example 2

Configuration:

  • See Configuration example A.
  • Declaration of an ImageMap with user-specific images for groups and leaves. For this purpose, the ImageMap is referenced within the tree-column using the attribute "imagemap" (imagemap="im_products). Every entry in the tree returns an expression via the method specified in the imageProperty, which is compared with the ImageMap. The corresponding image is used if there is a tally.

<util:imagemap name="im_products">
        <util:imagemapping
                rule="group.open"
                src="app/images/imgBoxOpen.gif"
                width="16" height="16"/>
        <util:imagemapping
                rule="group.closed"
                src="app/images/imgBoxClosed.gif"
                width="16"
                height="16"/>
        <util:imagemapping
                rule="single"
                src="app/images/imgItem.gif"
                width="16" height="16"/>
        <util:imagemapping
                rule="modem"
                src="app/images/tree/modem.gif"
                width="16"
                height="16"/>
        <util:imagemapping
                rule="mouse"
                src="app/images/tree/mouse.gif"
                width="16" height="16"/>
        <util:imagemapping
                rule="backup"
                src="app/images/tree/backup.gif"
                width="16"
                height="16"/>
</util:imagemap>

<ctrl:tree
        id="prod2"
        name="hardware"
        action="sample202/hardwareBrowse"
        root="true"
        linesAtRoot="true"
        labelProperty="name"
        imageProperty="type"
        imagemap="im_products"
        expandMode="multiple"
        groupselect="true"
        checkboxes="false"/>

Impressum | This product includes software developed by the Java Apache Project
Configuration examples
 ListControl  TreeControl  TreeListControl  TabSetControl  Forms