Tuple Editor

TupleEditor lives inside of a Form because its functionality is driven by the Form action. The TupleEditor edits a tuple read from the binding target specified by the expression in its "x" attribute.

In Textgen, the "x" attribute is used to specify an expression to which the component is bound. The expression is evaluated in the context of focus provided by the immediately containing component. Expressions can include an FRO to reference anything in the Focus Chain (of which the immediate containing component is the bottom of the chain).

TupleEditor has some typical assembly properties which are handy to override :

   * newAssignments
   * initialAssignments
   * defaultAssignments
   * fixedAssignments
   * publishedAssignments

Generally the Assignments, when fired, assign the value of a source expression to a target expression, with the target typically being a field in the tuple being edited.

The Assignments get fired as follows :

  1. newAssignments are fired when a new tuple that is not dirty becomes the target of the TupleEditor
    • newAssignments are used to associate initial values for new tuples only.
  2. initialAssignments are fired when a non dirty tuple becomes the target of the TupleEditor
    • initialAssignments are used to assign data values at the start of an editing session
  3. defaultAssignments are applied before saving a tuple to fields that have not been assigned a value in the editing session.
    • defaultAssignments are typically used to apply defaults to null fields
  4. fixedAssignments are applied before saving regardless of the current value of a field
    • fixedAssignments primarily are used for things like applying a timestamp or last-editing-user (data that gets edited every time). Note: fixedAssignments will not fire if the buffer is not dirty (use initialAssignments if the buffer may not otherwise be dirtied)
  5. publishedAssignments are applied each time the page is rendered.
    • publishedAssignments are typically used to export data from the referenced tuple to other application components.