adamc@325: table t1 : {Id : int, A : int, B : string, C : float, D : bool}
adamc@325:
adamc@353: val a = {Nam = "A",
adamc@353: Show = txt _,
adamc@353: Widget = fn nm :: Name => ,
adamc@353: WidgetPopulated = fn (nm :: Name) n =>
adamc@353: ,
adamc@353: Parse = readError _,
adamc@353: Inject = _}
adamc@353:
adamc@353: val b = {Nam = "B",
adamc@353: Show = txt _,
adamc@353: Widget = fn nm :: Name => ,
adamc@353: WidgetPopulated = fn (nm :: Name) s =>
adamc@353: ,
adamc@353: Parse = readError _,
adamc@353: Inject = _}
adamc@353:
adamc@353: val c = {Nam = "C",
adamc@353: Show = txt _,
adamc@353: Widget = fn nm :: Name => ,
adamc@353: WidgetPopulated = fn (nm :: Name) n =>
adamc@353: ,
adamc@353: Parse = readError _,
adamc@353: Inject = _}
adamc@353:
adamc@353: val d = {Nam = "D",
adamc@353: Show = txt _,
adamc@353: Widget = fn nm :: Name => ,
adamc@353: WidgetPopulated = fn (nm :: Name) b =>
adamc@353: ,
adamc@353: Parse = fn x => x,
adamc@353: Inject = _}
adamc@353:
adamc@325: open Crud.Make(struct
adamc@350: val tab = t1
adamc@350:
adamc@350: val title = "Crud1"
adamc@350:
adamc@353: val cols = {A = a,
adamc@353: B = b,
adamc@353: C = c,
adamc@353: D = d}
adamc@350: end)