- Can the same dimension (type) be used as a row and column dimension at the same time?
- A dimension is always passed around as its JSON representation.
- No two-way bindings on the settings data object itself!
- Dimension components only used to work with settings, nothing else.
- Composer only used to maintain lists of Dimension settings objects, nothing else.
- A Dimension can be valid or invalid.
- Only valid Dimensions are send to the application
- => only valid Dimensions are stored in/known to the Composer
- No function longer than 10 lines! Anywhere.
- update send after valid settings change, passes
this(?) - delete send when dimension should be deleted, passes
this
- edit toggles
isEditing - delete delegates to
sendAction
-
type type of dimension, override in subclass
-
caption summary of current setting, override in subclass
-
isValid boolean flag, result of validation
-
isEditing boolean flag, state of editing
-
settings object to hold all define-able dimension settings
- validate checks that all
settingsare valid, sets & returnsisValid - toJSON returns a consumable representation of this dimension in JSON
- type override, set to 'Carriers'
- caption override, set to CP based on
settingsto show summary
- validate override, check carriers-specific
settings - toJSON override, compose carriers-specific JSON representation
- save send when the current state of the composer should be saved
- update send when
rowsorcolschanged, i.e. afteradd,update,delete
- add(where, type) (rows|cols), (dimension type). pushes a new dimension object
- update(dim) the dim settings object. updates its own copy in
rows/colswithdim - delete(dim) the dim settings object. removes
dimfrom itsrows/cols - save gathers and concats all its
rows/colsdata, �delegates tosendAction
- rows array, all row dimension objects
- cols array, all column dimension objects
- dimensions array, all defined dimensions
- toJSON returns a nice representation of its current
rowsandcols