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

22
LINES

< > BotCompany Repo | #1005263 // dynRenderConcept - render concept (possibly) loaded through safeLoadConcepts [dev.]

JavaX fragment (include)

static S dynRenderConcept(O c) {
  if (c == null) ret "null";
  new StringBuilder buf;
  buf.append(c.id + " " + shortDynamicClassName(c));
  for (S field : listFields(c)) {
    O val = cget(c, field);
    if (val != null) {
      buf.append(" " + field + "=");
      buf.append(dynRenderConceptShort(val));
    }
  }
  ret str(buf);
}

static S dynRenderConceptShort(O val) {
  if (val instanceof DynamicObject) {
    O id = getOpt(val, "id");
    if (id instanceof Long)
      ret shortDynamicClassName(val) + id;
  }
  ret struct(val);
}

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: #1005263
Snippet name: dynRenderConcept - render concept (possibly) loaded through safeLoadConcepts [dev.]
Eternal ID of this version: #1005263/1
Text MD5: 832feba46863666a541ff4c551c04c52
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-10-27 22:30:13
Source code size: 563 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 449 / 458
Referenced in: