From 215686487c3443ba6190d78704c2f634d3e43163 Mon Sep 17 00:00:00 2001 From: Steve MARECHAL Date: Thu, 11 Sep 2008 07:39:19 +0000 Subject: [PATCH] dojo combobox added --- calexium_lib/web/CXM_common.anubis | 21 +++++++++++++++++++++ calexium_lib/web/CXM_dojo.anubis | 13 +++++++++++++ 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/calexium_lib/web/CXM_common.anubis b/calexium_lib/web/CXM_common.anubis index 5578e78..26550cd 100644 --- a/calexium_lib/web/CXM_common.anubis +++ b/calexium_lib/web/CXM_common.anubis @@ -125,6 +125,27 @@ public define Maybe((String,String)) else file_upload_value(t,name) } }. + +public define List((String,String)) + file_upload_value + ( + List(Web_arg) l, + String name, + List((String,String)) new_list + ) = + if l is + { + [ ] then new_list, + [h . t] then if h is + { + web_arg(_,_) then file_upload_value(t,name, new_list), + upload(n,v,tfn) then + if n = name + then file_upload_value(t,name, [(v,tfn) . new_list]) + else file_upload_value(t,name, new_list) + } + }. + public type Redirection: redirect(String required_uri, // URI required by the client diff --git a/calexium_lib/web/CXM_dojo.anubis b/calexium_lib/web/CXM_dojo.anubis index f877dae..40dd306 100644 --- a/calexium_lib/web/CXM_dojo.anubis +++ b/calexium_lib/web/CXM_dojo.anubis @@ -421,3 +421,16 @@ public define MF_FormField Mandatory mandatory, )= checkboxr([attr("dojoType", "dijit.form.CheckBox") . attributes] , label, id, name, val, checked, mandatory). + +public define MF_FormField + dojo_combobox + ( + List(InputAttrs) attributes, + WebArgName name, + HtmlId id, + String label, + List((WebArgValue,String)) list_data, + Maybe(InitialValue) selected, + )= + // selector_c([attr("dojoType", "dijit.form.ComboBox") . attributes], label, id, name, 1, list_data, selected, non_mandatory). + selector_c([], label, id, name, 1, list_data, selected, non_mandatory). -- libgit2 0.21.4