Tajson
No edit summary
No edit summary
Line 8: Line 8:


To facilitate update we look for special things in the ViewModel:
To facilitate update we look for special things in the ViewModel:
# Action ViewModelColumn_AddNew will be used to create new objects needed for viewmodel-association with name ViewModelColumn - Action must return created object - if action is not found we will look at type info and create object
# Action ViewModelColumn_AddNew will be used to create new objects needed for viewmodel-association with name ViewModelColumn - Action must return created object - if action is not found we will look at type info and create object. '''Note!''' the AddNew action MUST add the object to the association.
# Action Delete in nesting will be used if found when we need to delete object due to missing in input and merge mode is not in effect
# Action Delete in nesting will be used if found when we need to delete object due to missing in input and merge mode is not in effect
# Variable vImportKey:string if found will be updated prior to creating a object - can be used in the _AddNew action to look up existing object
# Variable vImportKey:string if found will be updated prior to creating a object - can be used in the _AddNew action to look up existing object
# Action CleanUpAction if found on root ViewModelClass will be called after the import is finished
# Action CleanUpAction if found on root ViewModelClass will be called after the import is finished

Revision as of 20:51, 17 March 2019

MDriven TaJson

It is a declarative approach to receive, send, transform and store json messages, with setup and maintenance environment done in minutes

Given a Json object iterates attributes and associations - matching names in a VMClass-instance, and updates internal hierarchy of VMClass given first attribute as key

The RootObject must be given to the VMClass, after that the json object updates hierachy below.

To facilitate update we look for special things in the ViewModel:

  1. Action ViewModelColumn_AddNew will be used to create new objects needed for viewmodel-association with name ViewModelColumn - Action must return created object - if action is not found we will look at type info and create object. Note! the AddNew action MUST add the object to the association.
  2. Action Delete in nesting will be used if found when we need to delete object due to missing in input and merge mode is not in effect
  3. Variable vImportKey:string if found will be updated prior to creating a object - can be used in the _AddNew action to look up existing object
  4. Action CleanUpAction if found on root ViewModelClass will be called after the import is finished
This page was edited 53 days ago on 03/26/2024. What links here