xotcl.wu-wien.ac.at
Begin main content
Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]

::xowiki::IncludeletClass[i] ::xowiki::includelet::form-menu

Class Hierarchy of ::xowiki::includelet::form-menu

  • ::xotcl::Object[i]
    Meta-class:
    ::xotcl::Class[i]
    Methods for instances:
    __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    getExitHandler, setExitHandler, unsetExitHandler
    • ::xo::Context[i]
      Meta-class:
      ::xotcl::Class[i]
      Parameter for instances:
      actual_query (default " "), locale, package_id (default "0"), parameter_declaration (default "")
      Methods for instances:
      exists_query_parameter, export_vars, get_all_query_parameter, get_parameters, initialize, original_url_and_query, process_query_parameter, query_parameter
      Methods to be applied on the class:
      Methods provided by the meta-class
      • ::xowiki::Includelet[i]
        Meta-class:
        ::xotcl::Class[i]
        Parameter for instances:
        __decoration (default "portlet"), id, name (default ""), parameter_declaration (default ""), title (default "")
        Methods for instances:
        category_clause, get_page_order, include_head_entries, initialize, js_name, resolve_page_name, screen_name
        Methods to be applied on the class (in addition to the methods provided by the meta-class):
        available_includelets, describe_includelets, glob_clause, html_encode, html_id, html_to_text, js_encode, js_name, listing, locale_clause, parent_id_clause, publish_status_clause, require_YUI_CSS, require_YUI_JS
        • ::xowiki::includelet::form-menu[i]
          Meta-class:
          ::xowiki::IncludeletClass[i]
          Parameter for instances:
          __decoration (default "none"), parameter_declaration (default " {-form_item_id:integer} {-parent_id} {-form} {-buttons {new answers}} {-button_objs} {-return_url} ")
          Methods for instances:
          render
          Methods to be applied on the class:
          Methods provided by the meta-class

Class Relations

  • superclass: ::xowiki::Includelet[i]
::xowiki::IncludeletClass create ::xowiki::includelet::form-menu \
     -superclass ::xowiki::Includelet \
     -parameter {{__decoration none} {parameter_declaration {
          {-form_item_id:integer}
          {-parent_id}
          {-form}
          {-buttons {new answers}}
          {-button_objs}
          {-return_url}
        }}}

Methods

  • instproc render

    ::202226 instproc render {} {
        my get_parameters
        #my msg form-menu-[info exists form_item_id] buttons=$buttons
        my instvar __including_page
        if {![info exists form_item_id]} {
          set form_item_id [::xowiki::Weblog instantiate_forms  -forms $form  -parent_id [$__including_page parent_id]  -package_id [$__including_page package_id]]
          if {$form_item_id eq ""} {
    	# we could throw an error as well...
    	my 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 [$package_id folder_id]
          set parent_id [$__including_page parent_id]
        }
        if {![info exists button_objs]} {
          foreach b $buttons {
            if {[llength $b]>1} {
              foreach {button id} $b break
            } else {
              foreach {button id} [list $b $form_item_id] break
            }
            set form [::xo::db::CrClass get_instance_from_db -item_id $id]
            #
            # "Package require" is just a part of "Package initialize" creating 
            # the package object if needed
            #
            set form_package_id [$form package_id]
            ::xowiki::Package require $form_package_id
            set obj [form-menu-button-$button new -volatile -package_id $package_id  -base [$form pretty_link]  -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 { &middot; }]</div></div>\n"
      }
    

Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]