Index: openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl 29 May 2003 18:49:01 -0000 1.7
+++ openacs-4/packages/acs-tcl/tcl/30-xml-utils-procs.tcl 15 Oct 2003 03:27:18 -0000 1.8
@@ -84,3 +84,18 @@
# ns_log notice "xml_node_get_content [$node_id nodeName] --> [$node_id text]"
return [$node_id text]
}
+
+# Get Node Type
+proc xml_node_get_type {node_id} {
+ return [$node_id nodeType]
+}
+
+# Render the doc
+proc xml_doc_render {doc_id {indent_p f}} {
+ if { [string is true $indent_p] } {
+ return [$doc_id asXML]
+ } else {
+ return [$doc_id asXML -indent none]
+ }
+}
+
Index: openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl,v
diff -u -r1.37 -r1.38
--- openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 30 Sep 2003 19:27:48 -0000 1.37
+++ openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 15 Oct 2003 03:27:18 -0000 1.38
@@ -210,16 +210,21 @@
-select_query
-
Defines a query that returns a single row containing values for each element of the form meant to be
- modifiable by the user. Can only be used if an element of type key has been declared.
+
+ Defines a query that returns a single row containing values for each
+ element of the form meant to be modifiable by the user. Can only be
+ used if an element of type key has been declared. Values returned from
+ the query are available in the form, but not the ADP template (for
+ that, use -edit_request instead).
-select_query_name
-
The name of a query to be looked up in the appropriate query file that returns a single row containing
- values for each element of the form meant to be modifiable by the user. In the OpenACS 4 environment this
- should normally be used rather than -select_query, as query files are the mechanism used to make the
- support of multiple RDMBS systems possible. Can only be used if an element of type key has been
- declared
+
+ Identical to -select_query, except instead of specifying the query
+ inline, specifies a query name. The query with that name from the
+ appropriate XQL file will be used. Use -select_query_name rather than
+ -select_query whenever possible, as query files are the mechanism used
+ to make the support of multiple RDMBS systems possible.
-show_required_p { 0 | 1 }
@@ -237,11 +242,17 @@
-edit_request
-
A code block which sets the values for each element of the form meant to be modifiable by the user. Use
- this when a single query to grab database values is insufficient. Can only be used if an element of
- type key is defined. This block is only executed if the page is called with a valid key, i.e. a
- self-submit form to add or edit an item called to edit the data. Set the values as local
- variables in the code block, and they'll get fetched and used as element values for you.
+
+ A code block which sets the values for each element of the form meant
+ to be modifiable by the user. Use this when a single query to grab
+ database values is insufficient. Any variables set in an -edit_request
+ block are available to the ADP template as well as the form, while
+ -select_query sets variables in the form only. Can only be used if an
+ element of type key is defined. This block is only executed if the
+ page is called with a valid key, i.e. a self-submit form to add or edit
+ an item called to edit the data. Set the values as local variables in
+ the code block, and they'll get fetched and used as element values for
+ you.
-new_request