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  

» 5. Configuration of the TreeControls within the JSP-Page

In order to use the TreeControl-tag on a JSP page, the corresponding tag library must be declared at the start of the page. Then, the Common-Controls can be used with the prefix <ctrl:tagname />. [In addition, the tag libraries must be included in the Deployment descriptor, the WEB-INF/web.xml file]

<%@ taglib uri="/WEB-INF/tlds/cc-controls.tld" prefix="ctrl" %>

<ctrl:tree
    id="prodtree1"
    name="products"
    action="sample201/productBrowse"
    root="true"
    linesAtRoot="true"
    labelProperty="name"
    imageProperty="type"
    expandMode="multiple"
    groupselect="true"
    checkboxes="false"/>

All the necessary steps for using the TreeControl are thus complete. The opening and closing behavior does not have to be self-implemented. It is administered by the control element itself. This also applies to the selection states of checkboxes, which can be activated with the attribute checkboxes="true". The programmer can thus concentrate on the technical sequences and on providing the display data.

Professional Edition: With the attribute runat="client", the tree is generated in a JavaScript version and and can thus be exploded and closed without Server Roundtrips. However, this increase in the user comfort does not need any changes in the application program.

back   |   continue

Impressum | This product includes software developed by the Java Apache Project
Tours
ListControl TreeControl TreeListControl TabSetControl Form Tags MenuControl Print version Live demo Configuration