I have the following page that I am trying to get working.
- A panel with a queue on the left that holds a set of Competencies in a Competency Model
- 2 field editors (no page includes) that I want to update on the right of the panel when the queue item is clicked. The first, a read-only model is the ActiveCompetency, which is based on the same Object as the Competencies model, but is a single record, with a description of the competency I need to evaluate as part of an employee appraisal. This is based on the idea from this post. I have this bit working.
- The second field editor is either a new or loaded editable component based on a CompetencyAssessment object, which is keyed off 2 other objects, ActiveCompetency and Appraisal, to enable me to make a specific assessment of a specific competency on a specific appraisal (which is in turn linked to a specific user). This second field editor does not render at all (I have the 2 field editors in the right panel, one of top of the other).
- Save the CompetencyAssessment model (if it exists) to avoid losing unsaved data as the user clicks different items in the queue. Note that this save could fail if there is no model to save, but it should fail gracefully (and silently).
- Activate a Model Condition to set the ActiveCompetency where clause so that the correct item renders in my top field editor
- Query the Active Competency Model.
- Query (if it exists) the CompetencyAssessment model (to load this into the editor, if it exists). OnError (ie, if this query doesn’t load anything) then it means there is no assessment in this appraisal for this competency, so create a new row on this model.
All the models are not set to load on page load, but are loaded only via Actions.
I hope this is clearly enough explained… I appreciate any suggestions.