Binding a Multi-Row Agent to a Scene

In this Lesson

You will learn how to attach an agent to a scene.

Concepts

The process of attaching an agent to a scene is called binding an agent or simply binding. Binding an agent to a scene allows the content and function of the agent to animate the skin and transform it into product.

Agents can be bound to the scene at two levels

  1. Agents can be attached to a layer
    The agent will be started when the layer is opened and stopped when the layer is closed.
  2. Agents can be attached to a scene
    These are called global agents. Global agents are started when the scene opens and stopped when the scene closes.

Agent binding is accomplished in the following ways

  1. Linking an agent node to a scene element
  2. Linking an agent event to a scene element
  3. Linking an agent conduit to a scene element
  4. Adding an agent to the scene or layer without linking it to any specific element
    This allows a scene to run and do things other than contribute content or function to scene elements.
    [ hmmm, what might those things be? ]

Bind an agent to a scene

You will now bind the PartyList agent to the PartyDefinition scene.

  1. Open the PartyDefinition scene



  2. Delete layers 1, 3, and 4



  3. Remove the “Open Layer 2” button from the remaining layer



  4. Select the Agent Binding Perspective



  5. Add the PartyList agent to the layer



  6. Take a moment to review how the agent information is presented



  7. Bind the partyName node to an element by dragging the node and dropping it on the element designed for the party name.



  8. Right click on the element to see its bindings



  9. Close the element properties by clicking on the layer design canvas.
  10. Right click on the row to see its bindings



  11. Close the element properties by clicking on the layer design canvas.
  12. Drag the host name node to its element in the scene



  13. Drag the partyDate node to its element in the scene



  14. Save the scene

Test the Scene

  1. Start the Derby database server if it is not already running.



  2. Start the server



  3. Start the solution



  4. Click through the splash scene.
  5. You should see parties from the Party table displayed in the scene.



That’s all for this lesson.