!7 !include once #1026287 // Multi-Comm Concepts cmodule MultiCommClient > DynMultiComm { switchable S password; transient S botID = #1026281; start { dm_reloadOnFieldChange('password); } enhanceFrame { minFrameSize(f, 300, 300); } visualize { if (empty(password) || !testPassword()) { JPasswordField pw = centerTextField(jpassword(password)); ret jfullcenter(withCenteredTitle("Please enter password:", onEnter(pw, r { setField(password := gtt(pw)); }))); } ret jcenteredlabel("Logged in"); } bool testPassword() { S result = print(queryBackend("testAuth")); bool ok = startsWith(result, "OK"); if (!ok) infoBox("Password check failed: " + result); ret ok; } S queryBackend(S uri, O... params) { ret postPage(rawBotLink(botID, uri), paramsPlus(params, _pass := password)); } void loadCustomers { // Customer objects will be unlisted L l = unstructureList(queryBackend("activeCustomers")); importAllConceptsOfType(Customer, l); } }