getForm method

dynamic getForm(
  1. dynamic name,
  2. dynamic label,
  3. dynamic context
)

Implementation

getForm(name, label, context) {
  myLogAll('getForm');
  if (!_formLists.containsKey(name)) {
    Map param = {
      gType: gForm,
      gFormdetail: {
        gFormName: name,
        gsBackgroundColor: 4280391411,
        gSubmit: gSubmit,
        gImgTitle: {
          gTitle: label,
          gFontSize: _defaultFontSize + 10.0,
          gHeight: 1.2,
          gLetterSpacing: 1.0
        },
        gHeight: 450.5,
        gTop: 130.0,
        gItems: {}
      },
      gActions: [
        {gType: gIcon, gValue: 58336, gAction: gMessenger}
      ],
      gBottomImgs: [],
      gTitle: {},
      gBtns: []
    };
    if (_tableList.containsKey(name)) {
      for (int i = 0; i < _tableList[name]![gColumns].length; i++) {
        Map ti = getMap(_tableList[name]![gColumns][i]);
        param[gFormdetail][gItems][ti[gDbid]] = ti;
      }
    }

    setFormListOne(name, param[gFormdetail], context);
  }

  return _formLists[name];
}