xowiki::formfield::dict_to_spec (public)

 xowiki::formfield::dict_to_spec [ -aspair ] [ -name name ] dict

Defined in packages/xowiki/tcl/form-field-procs.tcl

Convert the provided dict into a form-field spec together with the form-field name. When "-aspair" is specified the spec is returned in the list format as used by "create_components". If "-name" is not specified, the name has to be provided via dict member "_name", otherwise an exception is triggered.

Switches:
-aspair
(boolean) (defaults to "false") (optional)
-name
(optional)
Parameters:
dict

Partial Call Graph (max 5 caller/called nodes):
%3 test_dict_to_xx dict_to_xx (test xowiki) xowiki::formfield::dict_to_spec xowiki::formfield::dict_to_spec test_dict_to_xx->xowiki::formfield::dict_to_spec xowiki::formfield::dict_to_fc xowiki::formfield::dict_to_fc (public) xowiki::formfield::dict_to_spec->xowiki::formfield::dict_to_fc

Testcases:
dict_to_xx
Source code:
    if {$dict ne ""} {
      if {![info exists name]} {
        set name [dict get $dict _name]
        dict unset dict _name
      }
      if {$aspair_p} {
        return [list $name [dict_to_fc $dict]]
      } else {
        return "$name:[dict_to_fc $dict]"
      }
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: