!7 concept BEAObject { } module/*cmodule2*/ GazelleBEA > GazelleExamples { void init { super.init(); botName = heading = adminName = "Gazelle BEA"; set enableVars; set showTalkToBotLink; unset phoneNumberSpecialInputField; } L crudClasses(Req req) { ret listPlus(super.crudClasses(req), BEAObject); } S authFormHeading() { ret h3("Gazelle BEA"); } void makeFramer(Req req) { super.makeFramer(req); req.framer.renderTitle = () -> h1(ahref(baseLink + "/", "Gazelle BEA") + " " + htmlEncode2(req.framer.title)); } HCRUD makeCRUD(Class c, Req req, HTMLFramer1 framer) { HCRUD crud = super.makeCRUD(c, req, framer); if (c == BEAObject) { crud.massageFormMatrix = (map, matrix) -> { matrix.add(ll("Add field", htmlTable2_noHtmlEncode(ll( ll("Name", htextfield newField_name(), "Value", htextfield newField_value())), noHeader := true))); }; crud.preprocessUpdateParams = params -> { params = cloneMap(params); S name = params.get("newField_name"), value = params.get("newField_value"); if (nempty(name) && nempty(value)) params.put(fieldPrefix + name, value); ret params; }; } ret crud; } } // end of module !include early #1029913 // gazelle.rocks