Menu

#76 Generate the editor View Models

Accepted
nobody
Medium
Logic, Persistence, UI
Enhancement
All
2014-05-26
2014-05-25
Anonymous
No

Originally created by: jamieogl...@gmail.com
Originally owned by: jamieogl...@gmail.com

As an xpangen front end developer, I want view models to be generated. For each field I need things like ReadOnly that can be bound to controls, and I want events for value changes so that I can make dependent changes.

For example, if the LookupType changes, I want to change the values in a combo to be set accordingly. Once a new file group has been saved, I want things like the definition (base file) to be read only.

Discussion

  • Anonymous

    Anonymous - 2014-05-26

    Originally posted by: jamieogl...@gmail.com

    The Field View Model classes in the genedit project can act as a basis for this enhancement.

    My thinking is to have a view model partial class for each model class, giving access to a list of field view models. The user classes for each model class would bind each field to the corresponding field view model, with advanced bindings to things like ReadOnly or Enabled properties.

    It would also provide hooks to events, say when a field value changes, so that other fields can be updated. I expect that some of this will be generated using the Lookup fields in the definition.

     
  • Anonymous

    Anonymous - 2014-05-26

    Originally posted by: jamieogl...@gmail.com

    The view models should be made disposable, and the dispose method should disconnect any handlers, e.g. to data changes.

     

Log in to post a comment.

MongoDB Logo MongoDB