Customizing your forms

The next step is to customize your forms. The Query form should contain fields that correspond to the parameters of your service. The Response form should contain the fields that correspond to the results of your service. The Error form displays an error message to the user that something has gone wrong in the process of calling the service. You can display any message you choose on the Error screen.

To customize the Query form:

  1. Select the Query form in the Screen Outline pane.
  2. Use components from the Components panel, such as text input fields, radio buttons, combo boxes, and others, to create the input fields for the Query form.
  3. Once you've laid out your form elements, use the Parameters tab in the Component Inspector panel to create bindings between your components and the parameters of your service connector.

To customize the Response form:

  1. Select the Response form in the Screen Outline pane.
  2. Use components to create fields that will display the results.

    For example, if your service is a weather service returning temperature, you could use a label component to create a non-editable text display.

    Once you've laid out your components, use the Parameters tab in the Component Inspector panel to create bindings between your components and the results of your service connector.

To customize the Error form:

  1. Select the Applications form. The Error form is shown using ActionScript in Frame 1 of the Applications form, during processing of the service call. The following are the two event handlers:
    function status (stat) {
      // Handle status message for errors
      // If error,
      // showError();
    }
    
    function result (res) {
      // Handle result message for errors
      // If error,
      // showError();
    } 
    
  2. You can replace the bodies of these functions with your own code to interpret the status and result messages and do one of the following:
    • Catch an error and show the error screen.
    • Go directly to the results screen to display the service's response.

To learn more about the result and status messages of a service call, see Data Integration (Flash Professional Only).

Windowed Application template (Flash Professional only)

The Windowed Application template helps you create a windowed application that consists of layered content panes. These panes are draggable, and they rise to the topmost layer when the focus is on them. Each window can contain different content for the user to interact with.

The window components that load the subforms are on the Application form. The contentPath property of each window component corresponds to the instance name of the form that it will load at runtime.