Home
Home > CTC Generators > Tutorials
Tutorials
How do I start using the generator? Top of page

CTC Generators are add-in generators to the Component Enabler Generate Environment and therefore the initial setup follows the standard instructions for any CE compliant generator.

The first step before using a Generator is to setup a bundle in EAE or a folder in AB Suite that specifies the group of ispecs to be generated.

EAE Setup
  1. Within Enterprise Application Developer navigate to the Business Segment Options dialog.
  2. In the Component Enabler tab, check the field Component Enabler Capable and enter the details for Application Name, Package Prefix and CE Output Directory.
  3. Close the Business Segment Options dialog.
  4. Add a bundle to the Business Segment.
  5. Within the Component Enabler Bundle Options dialog, check the field View Generation Required and select the User Defined Generator option.
  6. In the Java Class field enter the name of the CTC Generator as shown here:
    • CTCSmartClientGenerate.dll
    • CTCSilverlightClientGenerate.dll
    • CTCWPFClientGenerate.dll
    • CTCWCFClientGenerate.dll
  7. Close the Component Enabler Bundle Options dialog.
  8. Right click on the bundle, select Generate Bundle and select the ispecs required to be generated as part of the user interface.

AB Suite Setup
  1. Within AB Suite Developer open the Business Segment Class properties window.
  2. In the Component Enabler User Interface category, enter the details for Application Name, Package Prefix and CE Output Directory.
  3. Close the Business Segment Class properties window.
  4. Add a folder to the Business Segment Class.
  5. Open the folder properties window.
  6. Enable the property Deploy Component Enabler User Interface.
  7. In the property User defined View Generator enter the name of the CTC Generator as shown here:
    • CTCSmartClientGenerate.dll
    • CTCSilverlightClientGenerate.dll
    • CTCWPFClientGenerate.dll
    • CTCWCFClientGenerate.dll
  8. Select C# for the property Ispec Model Source Language.
  9. Close the folder properties dialog.
  10. Add the ispecs required to be generated as part of the user interface to the folder.
  11. Right click on the folder, select the Rebuild option to generate the folder.

Note 1: Infrastructure files required for the generated user interface application are automatically copied to the views directory by the generator. Therefore there are no manual steps required for this.

Note 2: The generated user interface application is automatically compiled by the generator.

How do I reinstall the Infrastructure files after installing an upgrade to the generator? Top of page

When upgrading to a new version of a generator, infrastructure files that have changed are automatically installed to the bundle.

When starting a generate of a bundle, the generator checks the version against the version of the bundle and if upgrade is required, a message box similar to the one shown here will appear.

The message includes a list of infrastructure files that have changed. These files will automatically be installed to the bundle output directory when selecting the OK button.

Note: In case you have changed/customized any of these infrastructure files, ensure you have a recent backup of these files before you proceed. After installing the upgrade you may have to compare the customized files with CTC provided infrastructure files and reapply the changes.

How do I add a Custom Control to the configuration? Top of page

All generators include sample custom controls, such as DatePicker, GridView, Charting, Numeric Up/Down, etc. These controls are automatically added to the configuration when installing the generator.

Follow the steps below to add user developed custom controls.
  1. Start the CTC Configurator.
  2. Right click on the ‘generator’ node or the 'customControls' node if it exists and select ‘Add Custom Control’.
  3. In the properties pane, click on the Type property to get the dropdown arrow and click to open the dropdown list.
  4. From the dropdown list, select the custom control to be added.
  5. Click the Save icon to save this configuration.

How do I configure the AutoComplete feature on the ComboBox control? Top of page

AutoComplete is a property of the CTC ComboBox and therefore to set this property you must configure the Control Specifications of the ComboBox. Follow the steps below to configure AutoComplete on ComboBox:
  1. Start the CTC Configurator.
  2. Right click on the bundle node (or application node, or generator node) for which you want to configure the ComboBox control and select 'Control Specifications/Add Control Specification'.
  3. In the property pane, click on the 'ControlName' property to get the dropdown arrow and click to open the dropdown list.
  4. From the dropdown list, select ComboBoxControl.
  5. Click on the ControlProperties property and click the button to open the Properties Editor window.
  6. In the Properties Editor window, scroll down to the AutoComplete property and change False to True.
  7. Click OK to close the Properties Editor window.
  8. Click the Save icon to save this configuration.

How do I replace date fields with the DatePicker Custom Control? Top of page

The steps below show how to configure the generator to generate the DatePicker instead of the normal textbox for all date fields.
  1. Start the CTC Configurator.
  2. Right click on the ‘generator’ node and select ‘Control Substitutions’/’Add Control Substitution’ or right click the 'customSubstitutions' node if it already exists and select ‘Add Control Substitution’.
  3. In the properties pane, click on the ‘ControlName’ property to get the dropdown arrow and click to open the dropdown list.
  4. From the dropdown list, select TextBoxControl.
  5. Click on the ‘SubstituteWith’ property to get the dropdown arrow and click to open the dropdown list.
  6. From the dropdown list, select DatePicker.
  7. Click on the ‘MatchOnField’ property and click the button to open the Expression Editor.
  8. In the Expression Editor window, drag and drop 'IsTypeDate' to the MatchOnField Expression box.
  9. Click OK to close the Expression Editor window.
  10. Click the Save icon to save this configuration.