attribute::multirow (public)
attribute::multirow [ -start_with start_with ] \ [ -include_storage_types include_storage_types ] \ [ -datasource_name datasource_name ] [ -object_type object_type ] \ [ -return_url return_url ] object_id
Defined in packages/acs-subsite/tcl/attribute-procs.tcl
Sets up a multirow datasource containing the attribute values of object_id. We only support specific storage attributes. We include all attributes of the object's type, or any of its supertypes, up to $start_with.
- Switches:
- -start_with (optional, defaults to
"acs_object"
)- -include_storage_types (optional, defaults to
"type_specific"
)- -datasource_name (optional, defaults to
"attributes"
)- -object_type (optional)
- -return_url (optional)
- Parameters:
- object_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar $datasource_name attributes if {$object_type eq ""} { set object_type [db_string object_type_query { select object_type from acs_objects where object_id = :object_id }] } if {$return_url eq ""} { set return_url "[ad_conn url]?[ad_conn query]" } # Build up the list of attributes for the type specific lookup set attr_list [attribute::array_for_type -start_with $start_with -include_storage_types $include_storage_types attr_props enum_values $object_type] # Build up a multirow datasource to present these attributes to the user template::multirow create $datasource_name pretty_name value export_vars set package_object_view [package_object_view -start_with "acs_object" $object_type] if { [array size attr_props] > 0 } { db_foreach attribute_select [subst -nocommands { select * from ($package_object_view) dummy where object_id = :object_id }] { foreach key $attr_list { set col_value [set $key] set attribute_id $attr_props(id:$key) if { $attr_props(datatype:$key) eq "enumeration" && [info exists enum_values($key:$col_value)] } { # Replace the value stored in the column with the # pretty name for that attribute set col_value $enum_values($key:$col_value) } template::multirow append $datasource_name $attr_props(pretty_name:$key) $col_value "id_column=$object_id&[export_vars {attribute_id return_url}]" } } }Generic XQL file: packages/acs-subsite/tcl/attribute-procs.xql
PostgreSQL XQL file: packages/acs-subsite/tcl/attribute-procs-postgresql.xql
Oracle XQL file: packages/acs-subsite/tcl/attribute-procs-oracle.xql