initReferences method

void initReferences(
  1. QuestionDef? question
)

Computes the absolute references once the instance exists; with question (on the second pass) also the destination reference.

Implementation

void initReferences(QuestionDef? question) {
  nodesetRef = _absoluteRef(nodesetExpr!, contextRef!);
  if (labelExpr != null) labelRef = _absoluteRef(labelExpr!, nodesetRef!);
  if (copyExpr != null) copyRef = _absoluteRef(copyExpr!, nodesetRef!);
  if (valueExpr != null) valueRef = _absoluteRef(valueExpr!, nodesetRef!);
  if (question != null) {
    var dest = question.bind!;
    if (copyMode) {
      dest = dest.extend(copyRef!.lastName, TreeReference.indexUnbound);
    }
    _destRef = dest;
    _limitValueToSelectChoices = question.shouldLimitValueToSelectChoices;
  }
}