Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1014742 // setFormData - see autoSetDataFromForm

JavaX fragment (include)

static <A extends Component> A setFormData(SS data, A form) {
  ret setFormData(form, data);
}

static <A extends Component> A setFormData(A form, SS data) {
  if (!empty(data))
    for (Component c : allChildren(form)) {
      S id = componentID(c);
      if (id == null) continue;
      S value = data.get(id);
      if (value == null) continue;
      for (Component c2 : allChildren(c))
        if (c2 instanceof JTextComponent)
          setText((JTextComponent) c2, value);
    }
  ret form;
}

Author comment

Began life as a copy of #1014734

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014742
Snippet name: setFormData - see autoSetDataFromForm
Eternal ID of this version: #1014742/4
Text MD5: e0f66cdde46378bf8ea3e966c65e835d
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-01 16:07:30
Source code size: 514 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 353 / 392
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)