Symphony Framework
Symphony Collection v3 2
Symphony Templates > Symphony Collection v3 2
Template file name Symphony_Collection_v3_2.tpl

The Symphony_Collection (version 3.2) generates a collection class and populates the collection with the Selection List entries defined against each field in your Synergy Repository.

The created class is a populated collection of Symphony.Conductor.Content.SelectionItem.  Each collection item contains a ItemValue (or ItemStringValue for alpha based collections) and Description.  The ItemValue/ItemStringValue property can be data-bound to the SelectedValuePath of a ComboBox/drop-down list.  The Description is the element displayed (DisplayMemeberPath for a WPF ComboBox) within the visible list.

It is recommended that your generated code from the Symphony_Collection template is placed into a project sub-folder called Content.
 CodeGen Template Tokens
Token Comments
NAMESPACE Specifies the namespace within which to create the class.
 Symphony Tokens
There are no Symphony Tokens required for this template.

       
 CodeGen Command Examples
Create standard collection
codegen e -r -s PART -t Symphony_Collection_v3_2 -o %ROOT%ControlLibrary\Content -n ControlLibrary.Content
 Example
;;****************************************************************************
;;
;; WARNING: This code was code generated. Any changes that you
;;          make to this code will be overwritten if the code is regenerated!
;;
;; Template author:    Richard C. Morris : RCP Consultants.
;;
;; Template Name:    Symphony Framework : SYMPHONY_COLLECTION_V3_2.tpl
;;
;;****************************************************************************

import System
import System.Collections.Generic
import System.Text

import Symphony.Conductor.Content

namespace ControlLibrary.Content

    public class PART_STATUS_Collection extends SelectionItemList

        public method PART_STATUS_Collection
            endparams
        proc
            this.add(new SelectionItem("Live", 0))
            this.add(new SelectionItem("Replaced", 1))
            this.add(new SelectionItem("Obsolete", 2))
        endmethod

    endclass
endnamespace


See Also

Reference