Index: openacs-4/packages/xotcl-core/tcl/generic-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/generic-procs.tcl,v diff -u -r1.16.2.2 -r1.16.2.3 --- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 19 May 2006 21:13:29 -0000 1.16.2.2 +++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 13 Jun 2006 18:46:03 -0000 1.16.2.3 @@ -763,11 +763,13 @@ Form ad_instproc generate { {-template "formTemplate"} + {-export} } { the method generate is used to actually generate the form template from the specifications and to set up page_title and context when appropriate. @template is the name of the tcl variable to contain the filled in template + @export list of attribue value pairs to be exported to the form (nested list) } { # set form name for adp file my set $template [my name] @@ -777,11 +779,12 @@ #my log "-- $data, cl=[$data info class] [[$data info class] object_type]" my log "--e final fields [my fields]" - ad_form -name [my name] -form [my fields] \ - -export [list [list object_type $object_type] \ + set exports [list [list object_type $object_type] \ [list folder_id $folder_id] \ [list __object_name $object_name]] - + if {[info exists export]} {foreach pair $export {lappend exports $pair}} + ad_form -name [my name] -form [my fields] -export $exports + set new_data "set item_id \[[self] new_data\]" set edit_data "set item_id \[[self] edit_data\]" set new_request "[self] new_request"