Class ::xowiki::includelet::form-menu (public)
::xowiki::IncludeletClass ::xowiki::includelet::form-menu
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
Include a form menu for the specified Form
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::form-menu {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::form-menu instproc render {} { :get_parameters set package_id [${:__including_page} package_id] #:msg form-menu-[info exists form_item_id] buttons=$buttons if {![info exists form_item_id]} { set form_item_id [::$package_id instantiate_forms -forms $form -parent_id [${:__including_page} parent_id]] if {$form_item_id eq ""} { # we could throw an error as well... :msg "could not locate form '$form' for parent_id [${:__including_page} parent_id]" return "" } } if {[info exists parent_id]} { if {$parent_id eq "self"} { set parent_id [${:__including_page} item_id] } } else { set parent_id [${:__including_page} parent_id] } if {![info exists button_objs]} { set button_objs {} foreach b $buttons { if {[llength $b]>1} { lassign $b button id } else { lassign [list $b $form_item_id] button id } set form [::xo::db::CrClass get_instance_from_db -item_id $id] set form_package_id [$form package_id] if {$form_package_id eq ""} { # # When the package_id is empty, the page might be from a # site-wide page. Resolve the form page to the local context # $form set_resolve_context -package_id $package_id -parent_id $parent_id set form_package_id $package_id } # # "Package require" is just a part of "Package initialize" # creating the package object if needed.... # ::xowiki::Package require $form_package_id set obj [form-menu-button-$button new -volatile -package_id $package_id -base [::$package_id pretty_link -parent_id $parent_id [$form name]] -form $form -parent_id $parent_id] if {[info exists return_url]} {$obj return_url $return_url} lappend button_objs $obj } } set links [list] foreach b $button_objs { lappend links [$b render] } return "<div style='clear: both;'><div class='wiki-menu'>[join $links { · }]</div></div>\n" } ::xowiki::includelet::form-menu instparametercmd parameter_declaration ::xowiki::includelet::form-menu instparametercmd __decoration ::nsf::relation::set ::xowiki::includelet::form-menu superclass ::xowiki::Includelet ::nx::slotObj -container slot ::xowiki::includelet::form-menu ::xowiki::includelet::form-menu::slot eval {set :__parameter { {__decoration none} {parameter_declaration { {-form_item_id:integer} {-parent_id} {-form} {-buttons {new answers}} {-button_objs} {-return_url} }} }} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::form-menu::slot::__decoration {set :accessor public set :configurable true set :convert false set :default none set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::form-menu set :incremental 0 set :manager ::xowiki::includelet::form-menu::slot::__decoration set :methodname __decoration set :multiplicity 1..1 set :name __decoration set :parameterSpec {-__decoration:substdefault none} set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::form-menu::slot::parameter_declaration {set :accessor public set :configurable true set :convert false set :default { {-form_item_id:integer} {-parent_id} {-form} {-buttons {new answers}} {-button_objs} {-return_url} } set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::form-menu set :incremental 0 set :manager ::xowiki::includelet::form-menu::slot::parameter_declaration set :methodname parameter_declaration set :multiplicity 1..1 set :name parameter_declaration set :parameterSpec {-parameter_declaration:substdefault { {-form_item_id:integer} {-parent_id} {-form} {-buttons {new answers}} {-button_objs} {-return_url} }} set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle