Bungee Logic : Intrinsic : Model

Changes Locked Out for Planned Maintenance
Page Status: Beta
Jump to: navigation, search

Back to Intrinsic Functions

Contents

[edit] Description

Each control connection contains two intrinsic functions associated with the connection: Model and View.

Use the Model function to add code to a connection so that you can cause programmatic updates to your application's View (UI). This may sound contradictory, but the updates to the View are based on changes in your Model (application objects), hence this is Model code.

[edit] Adding Model Code

  • You add Model code to the desired connection field by by clicking the M (Add Model Code) button next to that field.

[edit] Variables

Model functions contain two intrinsic variables:

  • var Object context--provides a way to access the object context of the connection
  • var (connection type) view--provides a way to access the fields of the connection

[edit] Example

There is an example of Model code in Example 3 of the DynamicForm control documentation. The code (shown below) updates the View (the form displayed) based on changes to the Model (the value of a string field called formType). Based on the code in the Model function below, changes to the value of formType programmatically determine whether a "read-only" or "editable" form gets displayed to the user.

 

[edit] Properties

General Tab

  • Execute On Initialization—Allows you to specify whether or not to fire the function on initialization of the connection
  • Name—The name of the function
  • Trigger—Allows you to specify an object member whose value changes triggers the Model function

[edit] See Also

View

 


Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.