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.90 -r1.90.2.1 --- openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 5 Sep 2007 23:04:59 -0000 1.90 +++ openacs-4/packages/xotcl-core/tcl/generic-procs.tcl 21 Nov 2008 13:26:32 -0000 1.90.2.1 @@ -47,8 +47,8 @@ my forward var uplevel #$level set my instvar data folder_id + set folder_id [[$data package_id] folder_id] set class [$data info class] - set folder_id [$data set parent_id] if {![my exists add_page_title]} { my set add_page_title [_ xotcl-core.create_new_type \ @@ -99,8 +99,8 @@ set old_name [::xo::cc form_parameter __object_name ""] set new_name [$data set name] if {$old_name ne $new_name} { - db_dml [my qn update_rename] "update cr_items set name = :new_name \ - where item_id = [$data set item_id]" + #my msg "rename from $old_name to $new_name" + $data rename -old_name $old_name -new_name $new_name } } return [$data set item_id] @@ -123,26 +123,24 @@ set context [list $edit_form_page_title] } - Form instproc new_request {} { - #my log "--- new_request ---" - my request create + Form instproc set_form_data {} { my instvar data - #my log "--VAR [my var item_id]" foreach var [[$data info class] array names db_slot] { if {[$data exists $var]} { my var $var [list [$data set $var]] } } } + + Form instproc new_request {} { + #my log "--- new_request ---" + my request create + my set_form_data + } Form instproc edit_request {item_id} { - my instvar data #my log "--- edit_request ---" my request write - foreach var [[$data info class] array names db_slot] { - if {[$data exists $var]} { - my var $var [list [$data set $var]] - } - } + my set_form_data } Form instproc on_submit {item_id} {