Commit 215686487c3443ba6190d78704c2f634d3e43163

Authored by Steve MARECHAL
1 parent 0f3fad3e

dojo combobox added

calexium_lib/web/CXM_common.anubis
@@ -125,6 +125,27 @@ public define Maybe((String,String)) @@ -125,6 +125,27 @@ public define Maybe((String,String))
125 else file_upload_value(t,name) 125 else file_upload_value(t,name)
126 } 126 }
127 }. 127 }.
  128 +
  129 +public define List((String,String))
  130 + file_upload_value
  131 + (
  132 + List(Web_arg) l,
  133 + String name,
  134 + List((String,String)) new_list
  135 + ) =
  136 + if l is
  137 + {
  138 + [ ] then new_list,
  139 + [h . t] then if h is
  140 + {
  141 + web_arg(_,_) then file_upload_value(t,name, new_list),
  142 + upload(n,v,tfn) then
  143 + if n = name
  144 + then file_upload_value(t,name, [(v,tfn) . new_list])
  145 + else file_upload_value(t,name, new_list)
  146 + }
  147 + }.
  148 +
128 149
129 public type Redirection: 150 public type Redirection:
130 redirect(String required_uri, // URI required by the client 151 redirect(String required_uri, // URI required by the client
calexium_lib/web/CXM_dojo.anubis
@@ -421,3 +421,16 @@ public define MF_FormField @@ -421,3 +421,16 @@ public define MF_FormField
421 Mandatory mandatory, 421 Mandatory mandatory,
422 )= 422 )=
423 checkboxr([attr("dojoType", "dijit.form.CheckBox") . attributes] , label, id, name, val, checked, mandatory). 423 checkboxr([attr("dojoType", "dijit.form.CheckBox") . attributes] , label, id, name, val, checked, mandatory).
  424 +
  425 +public define MF_FormField
  426 + dojo_combobox
  427 + (
  428 + List(InputAttrs) attributes,
  429 + WebArgName name,
  430 + HtmlId id,
  431 + String label,
  432 + List((WebArgValue,String)) list_data,
  433 + Maybe(InitialValue) selected,
  434 + )=
  435 + // selector_c([attr("dojoType", "dijit.form.ComboBox") . attributes], label, id, name, 1, list_data, selected, non_mandatory).
  436 + selector_c([], label, id, name, 1, list_data, selected, non_mandatory).