In order to create a view that organizes items into a tree hierarchy, you need to complete the following tasks. If you want to add your tree to the Asset Picker, see Creating a Tree-Based Asset Picker Plugin. Many of the resources you create and configure here are also described in the Asset Picker section.

Follow these steps:

  1. Create a component of class atg.web.tree.repository.MutableRepositoryTreeDefinition , which defines the relationship between the repository items in the tree. See Mutable Repository Tree Definition Component for more information. There are two properties specific to the process of creating a Navigation pane tree:

    • The cloneHelper property holds the Nucleus component that provides the naming strategy for duplicated items.

    • The useRootNodeAsDefaultParent property indicates, for a tree with one type of root node, whether that node is hidden from the Browse view, but visible in the Asset Picker (true) or visible in both locations (false). If set to true, the root node is the default parent of newly created items.

  2. Create a component of class atg.web.tree.CountBasedBucketer , which organizes a large numbers of items into buckets. See Count Based Bucketer Component for more information.

  3. Create a component of class atg.web.tree.BucketingTreeImpl, which controls the display of items in the tree. See Bucketing Tree Impl Component for information.

  4. Create a component of class atg.web.tree.TreeState, which manages tree state persistence for each user.

    To learn about the properties of Tree State, see the discussion of its subclass, atg.web.assetpicker.tree.repository.ContextClearingTreeState, provided in the Tree State Component section. All properties described there are defined in Tree State.

  5. Update the atg/web/assetmanager/TreeRegistry component as described in the Tree Registry Component section.

  6. Create a Browse Tree View Configuration component, which manages the other tree-related components and specifies the types of items you can create in this view. See below for instructions.

  7. Add an entry for the new view to the task configuration file. You can find code that implements a fictitious Manufacturer view in the Changing UI Labels. For general information about task configuration files and the tags they contain, see Customizing the UI for Specific Tasks and Activities.

You can define your tree further by providing additional configuration described in the Creating a Tree-Based Asset Picker Plugin. All options available to the Asset Picker dialog box are available to tree views in the Browse tab.

Browse Tree View Configuration Component

To organize your items in a tree hierarchy view, create a component of class atg.web.assetmanager.configuration.BrowseTreeViewConfiguration, and save it in a directory that holds other resources for that view, such as the /atg/web/assetmanager/configuration directory. For instructions on creating Nucleus components in the ACC, see Appendix C: Managing Nucleus Components in the ATG Page Developer’s Guide.

For the purpose of this instruction, assume that you are creating a view that lists assortments. The component you create is called Assortments Browse Tree View Configuration. Set the following properties on this component:

Property

Description

createableTypes

Holds the list of item types that can be created in this view, generated based on the values from the createableTypesList property. This property is read-only.

createableTypesList=\
/atg/commerce/catalog/Assortments,\
atg/commerce/catalog
/SecureProductCatalog:products,\
atg/commerce/catalog
/SecureProductCatalog:skus

Holds the list of item types that can be created in this view. Note that you can include the item descriptor name only, but you’re encouraged to specify the full path to safeguard against naming conflicts. Leaving this property empty permits users to create items of all types that are made visible to the tree by the Mutable Repository Tree Definition component. The list that appears in the Create New drop-down list is automatically alphabetized.

treeComponentName=/atg/commerce/web
/browse/AssortmentTreeState

Holds the component that configures the version of the tree that displays in tabs such as the Browse tab.


Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices