Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 10 Mar 2008 13:16:02 -0000 1.16 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 14 Mar 2008 13:17:37 -0000 1.17 @@ -2609,7 +2609,7 @@ } set form_item [::xowiki::Form get_instance_from_db -item_id $form_item_id] - set form_constraints [$form_item get_form_constraints $o] + set form_constraints [$form_item get_form_constraints] if {![info exists field_names]} { set fn [::xowiki::PageInstance get_short_spec_from_form_constraints \ Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.211 -r1.212 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 12 Mar 2008 09:24:14 -0000 1.211 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 14 Mar 2008 13:17:37 -0000 1.212 @@ -1233,11 +1233,13 @@ PageInstance instproc get_short_spec {name} { my instvar page_template - set form_constraints [my get_from_template form_constraints] - #my msg "get_short_spec $name c=$form_constraints" + #set form_constraints [my get_from_template form_constraints] + set form_constraints [my get_form_constraints] if {$form_constraints ne ""} { - return [::xowiki::PageInstance get_short_spec_from_form_constraints \ + set s [::xowiki::PageInstance get_short_spec_from_form_constraints \ -name $name -form_constraints $form_constraints] + #my msg "get_short_spec $name c=$form_constraints => '$s'" + return $s } return "" } @@ -1286,11 +1288,9 @@ return [my page_template] } - Page instproc get_form_constraints {form_item} { - # Whis method determines the form constraints typically - # from the form item object (::xowiki::Form) - # We define it as a method of Page to ease overloading. - return [$form_item form_constraints] + PageInstance instproc get_form_constraints {} { + # We define it as a method to ease overloading. + return [my get_from_template form_constraints] } PageInstance instproc get_from_template {var} { @@ -1300,6 +1300,7 @@ #my log "-- fetching page_template = $page_template" ::xo::db::CrClass get_instance_from_db -item_id $form_id } + #my msg "form_id=$form_id, [$form_id name]" if {[::$form_id exists $var]} {return [::$form_id set $var]} return "" } @@ -1413,6 +1414,10 @@ return $content } + Form instproc get_form_constraints {} { + # We define it as a method to ease overloading. + return [my form_constraints] + } Page instproc list {} { # todo move me