srecord noeq G22VariablesPanel(G22Utils g22utils) { settable bool compactView; transient SimpleCRUD_v2 crud; transient SingleComponentPanel scpDetail; transient ReliableSingleThread rstUpdateDetail = rst(l0 _updateDetail); cachedVisualize { crud = new SimpleCRUD_v2<>(g22utils.concepts(), G22Variable); crud.iconButtons(true); crud.entityName = -> "Variable"; //if (compactView) crud.hideField("persistent"); var vis = jCenteredSection("Project Variables", crud.visualize()); if (compactView) ret vis; crud.onSelectionChanged(-> { print("Selection: " + crud.selected(); rstUpdateDetail!; }); scpDetail = scp(); ret jvsplit(vis, scpDetail); } void updateCount { crud.update(); } void setSelected(G22Variable var) { crud.setSelected(var); } void _updateDetail { var var = crud.selected(); if (var == null) ret with scpDetail.clear(); O value = var.value; var vis = new G22JavaObjectVisualizer(g22utils, value).visualize(); bindChangeListenerToComponent(vis, var.varValue(), -> { if (!eq(var.value, value)) rstUpdateDetail!; }); scpDetail.set(jCenteredSection("Variable " + var.name, vis)); } }