Forum OpenACS Development: Re: Adding return_url support to xowiki/www/edit

Collapse
Posted by Gustaf Neumann on
there are most probably many ways to achieve this. the easiest approach is most probably to subclass WikiForm, redefine in the subclassed form the method update_references like
Class MySpecializedWikiForm -superclass WikiForm
MySpecializedWikiForm instproc update_references {} {
   set provided [my submit_link]
   next
   my submit_link $provided
}
In edit.tcl provide submit_link in the form generation (f1) with a value (.... create ::xowiki::f1 .... -submit_link whatever) and you are done. since update_references is called by new_data and edit_data, this should work ok with the current code. by subclassing the form, you can tailor all of the behavior...

anyhow, allowing the user to export variables seems useful, so i added to to xotcl-core in oacs-5-2. It can be used in edit.tcl like:

::xowiki::f1 generate -export [list [list var1 value1]]

Thanks for your quick response and work on this Gustaf. Dave is doing this work for me. We are mixing wiki content pages with assessment sections and displaying them in a sequenced order using LORS (to which we are adding a sequencing UI that works with these two kinds of acs_objects). Dave mentioned this in the previous thread. It is turning out nicely. I look forward to getting this into the next version of .LRN once the saw dust has settled a little. Really like XoWiki Gustaf.