category::ad_form::fill_widgets (public)

 category::ad_form::fill_widgets \
    -container_object_id container_object_id \
    [ -categorized_object_id categorized_object_id ] \
    [ -element_name element_name ]

Defined in packages/categories/tcl/category-form-procs.tcl

Reads mapped categories values from categorized object and sets them into its auto-generated category form widgets. To be used in the -edit_request clause of ad_form.

Switches:
-container_object_id (required)
-categorized_object_id (optional)
-element_name (optional, defaults to "category_id")
Author:
Antonio Pisano <antonio@elettrotecnica.it>

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::Generic::Form Class ::Generic::Form (public) category::ad_form::fill_widgets category::ad_form::fill_widgets Class ::Generic::Form->category::ad_form::fill_widgets Generic::Form instproc generate Generic::Form instproc generate (public) Generic::Form instproc generate->category::ad_form::fill_widgets category::get_mapped_categories category::get_mapped_categories (public) category::ad_form::fill_widgets->category::get_mapped_categories category_tree::get_mapped_trees category_tree::get_mapped_trees (public) category::ad_form::fill_widgets->category_tree::get_mapped_trees template::adp_level template::adp_level (public) category::ad_form::fill_widgets->template::adp_level

Testcases:
No testcase defined.
Source code:
    # For each mapped tree...
    foreach tree [category_tree::get_mapped_trees $container_object_id] {
    lassign $tree tree_id name subtree_id assign_single_p require_category_p widget
    # ...get reference to this tree's form widget...
        upvar #[template::adp_level]  __category__ad_form__$element_name\_${tree_id} my_category_ids
    # ...and set its value to the categories mapped for this object.
    set categories [category::get_mapped_categories -tree_id $tree_id $categorized_object_id]
        set my_category_ids $categories
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: