Jump to: navigation, search

Accessing the Editors and Templates


Composer editors are embedded/integrated within the user interface and are made available to you whenever a .scxml, .vxml, .ccxml, .grxml, or .jsp file is created or accessed within Composer.

Creating a New File

In Composer or Composer Design perspective, create a new VoiceXML, SCXML, or CallControlXML file as follows:

  • Select File > New > Other > Composer > Others > Others> Others.
  • Select the file type, such as SCXML.
  • Select the parent folder; usually an existing Project.
  • Enter a name for the file.
  • If applicable, click Advanced to link to the file system and use an existing file.
  • Click Finish.

Using an Existing Template

  • Select File > New > Other > Composer > Others.
  • Select the file type.
  • Select the parent folder; usually an existing Project.
  • Enter a name for the file.
  • If applicable, click Advanced to link to the file system and use an existing file.
  • Click Next.
  • Select the template.
  • Click the Use SCXML Template checkbox.
    • Click Finish.

The editor opens with your new file.  When working with XML files, the view contains Source and Design tabs. All editor functions described at the top of this topic are available to you. The appropriate Composer editor also opens whenever you open an existing  .vxml, .ccxml, .grxml, .aspx, or .jsp file, whether previously created as described above, or previously imported into Composer.

Open an Existing File

Open an existing file as follows:

  • Select File > Open File.
    • Navigate to the file to open, OR

Open a Composer Project's src or src-gen folder in the Project Explorer, then double-click the file to open it in the editor.

Creating a Custom Code Template

When writing manual SCXML/VXML/CCXML/GRXML code in the file editors, you may run into code that becomes repetitive. You may consider creating a code template to avoid retyping this block of code. Creating templates will improve the speed and consistency for writing code. The following steps show how to create a code template.

  • Select Window > Preferences.
  • In the Preferences dialog box, navigate through the Composer category, and expand the file type (VXML Files / CCXML Files / GRXML / SXCML Files) in which you want to add your template. Then select the Templates section. For example, select VXML Templates.
  • Click the New button to add a new code template.
  • Fill in the fields for the new template. The Context drop down box specifies at what context level you want the code template to appear as a context sensitive help.
  • Click the OK button when finished.

XML File Preferences

You can also set XML File Preferences: Window > Preferences > XML > XML Files. When specifying Encoding formats in the XML Preference page: encoding formats are applicable only for new File creation using the Template option: (File > New > XML > XML File > Create XML File from an XML Template > Select XML Template). This applies only to new XML, VXML, CCXML and SCXML files. Existing files within the Project will not get impacted.

Creating a Backend JSP File

  • Create a new JSP file by selecting File > New > Backend JSP file.
  • In the Create Backend JSP File folder, navigate to the src folder within the Java Composer Project in which the Backend JSP file belongs.
  • Type a name In the File Name field.
  • Click Finish.

The Editor opens with a JSP file template. You can see your new file in the src folder of your Java Composer Project in the Project Explorer. A template is provided when you create a new Backend JSP file in Composer. You implement a performLogic method as a JSON object, store a result and return it to the voice application if desired. You have the flexibility to enter any valid JSP code that you wish.

Creating a Backend ASP .NET File

  • Create a new ASP.NET file by selecting File > New > Backend ASPX file.
  • In the ASPX File folder, navigate to the include folder within the .NET Composer Project in which the Backend ASPX file belongs.
  • Type a name In the File Name field.
  • Click Finish.

The Editor opens with an ASPX file template. You can see your new file in the include folder of your .NET Composer Project in the Project Explorer. A template is provided when you create a new Backend ASPX file in Composer. You implement a performLogic method as a JSON object, store a result and return it to the voice application if desired. You have the flexibility to enter any valid ASP.NET/C# code that you wish.

This page was last edited on November 30, 2018, at 18:46.
Comments or questions about this documentation? Contact us for support!