- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::includelet::available-formfields
::xowiki::includelet::available-formfields create ... \List the available form field types of this installation.
[ -parameter_declaration (default " {-flat:boolean false} ") ] \
[ -title (default "The following formfield types can be used in xowiki::Forms") ]
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
Class Relations
::xowiki::IncludeletClass create ::xowiki::includelet::available-formfields \ -superclass ::xowiki::IncludeletMethods (to be applied on instances)
class_name (scripted)
return [expr { [string match ::xowiki::formfield:* $cl] ? [namespace tail $cl] : [string trimleft $cl :] }]parameter_declaration (setter)
render (scripted)
:get_parameters foreach cl [lsort [::xowiki::formfield::FormField info subclass -closure]] { set result "" set superClassName [:class_name [$cl info superclass]] set className [:class_name $cl] set abstract [expr {[$cl exists abstract] && [$cl set abstract] ? "abstract, " : ""}] append result "<b><a name='$className' title='$cl'>$className</a></b> " "(${abstract}superclass <a href='#$superClassName'>$superClassName</a>)\n" "<ul>\n" foreach p [lsort [$cl info parameter]] { if {[llength $p] == 2} { lassign $p name value append result "<li>-$name <em>[ns_quotehtml $value]</em></li>\n" } else { append result "<li>-$p</li>" } } append result "</ul>\n" set index [::xo::api object_index "" $cl] if {[nsv_exists api_library_doc $index]} { set doc_elements [nsv_get api_library_doc $index] append result <p>[lindex [dict get $doc_elements main] 0]</p> } else { append result <p> } set :html($className) $result } if {$flat} { # # Output as flat list # set result <ul> foreach className [lsort [array names :html]] { append result "<li>[set :html($className)]</li>\n" } append result "</ul>" } else { # # Output as tree # set result [:render_as_tree ::xowiki::formfield::FormField [::xowiki::formfield::FormField info subclass]] } return $resultrender_as_tree (scripted)
set subclassHTML "" set sort_names {} foreach subcl $subclasses { lappend sort_names $subcl [:class_name $subcl] } foreach {subcl sort_name} [lsort -index 1 -stride 2 $sort_names] { append subclassHTML <li>[:render_as_tree $subcl [$subcl info subclass]]</li> } if {[llength $subclasses] > 0} { set subclassHTML <ul>$subclassHTML</ul> } append result [set :html([:class_name $cl])] $subclassHTMLtitle (setter)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables