Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.156 -r1.157 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 5 Nov 2009 12:34:16 -0000 1.156 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 16 Nov 2009 09:55:21 -0000 1.157 @@ -1891,8 +1891,34 @@ return [my pretty_image -parent_id [[my object] parent_id] $entry_name] } + ########################################################### # + # ::xowiki::formfield::include + # + ########################################################### + + Class include -superclass text -parameter { + } + include instproc pretty_value {v} { + my instvar object + array set "" [$object package_item_ref -default_lang [$object lang] -parent_id [$object parent_id] $v] + if {$(item_id) == 0} { + # Here, we could call "::xowiki::Link render" to offer the user means + # to create the entry like with [[..]], if he has sufficent permissions...; + # when $(package_id) is 0, the referenced package could not be + # resolved + return "Cannot resolve symbolic link '$v'" + } + if {![my isobject $(item_id)]} { + set deref [::xo::db::CrClass get_instance_from_db -item_id $(item_id)] + } + return [$(item_id) render] + } + + + ########################################################### + # # ::xowiki::formfield::CompoundField # ###########################################################