[docs] docs - heins modified ictable_editor.sdf

docs@icdevgroup.org docs@icdevgroup.org
Sat Sep 28 11:24:01 2002


User:      heins
Date:      2002-09-28 15:23:49 GMT
Modified:  .        ictable_editor.sdf
Log:
* Continuing the assault on ictable_editor docs. Finished through H in
  attributes.

Revision  Changes    Path
1.4       +136 -5    docs/ictable_editor.sdf


rev 1.4, prev_rev 1.3
Index: ictable_editor.sdf
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /anon_cvs/repository/docs/ictable_editor.sdf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ictable_editor.sdf	28 Sep 2002 02:59:13 -0000	1.3
+++ ictable_editor.sdf	28 Sep 2002 15:23:48 -0000	1.4
@@ -1,9 +1,9 @@
 !init OPT_LOOK=3D"icdevgroup"; OPT_STYLE=3D"manual"
-# $Id: ictable_editor.sdf,v 1.3 2002/09/28 02:59:13 mheins Exp $
+# $Id: ictable_editor.sdf,v 1.4 2002/09/28 15:23:48 mheins Exp $
 !define DOC_NAME "Configuration Reference"
 !define DOC_TYPE ""
 !define DOC_CODE "icconfig"
-!define DOC_VERSION substr('$Revision: 1.3 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.4 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/ictable_editor.html"
@@ -140,6 +140,7 @@
 To change the style of the label column, you can set the style
 information with:
=20
+!block example
     [table-editor
         table=3Dproducts
         key=3Dos28004=20
@@ -152,6 +153,7 @@
         width.description=3D50
         height.description=3D10
     ][/table-editor]
+!endblock
=20=20=20=20=20
 This should B<bold> the label text.
=20
@@ -170,7 +172,10 @@
 the [calc] [/calc] tag pair except that contained ITL tags are not
 interpolated.
=20
-Pipe-quoting has the attribute of=20
+Pipe-quoting has the attribute of stripping trailing and leading
+whitespace; it is often convenient when specifying JavaScript (which uses
+both single and double quotes frequently) in the various C<*_extra> parame=
ters.
+
 H2: Templating
=20
 The [table-editor] is templated on several levels. In the most basic
@@ -761,8 +766,9 @@
=20
 LI1: filter
=20
-Specifies a filter that will be applied to the widget result data before
-it is put in the database. To make sure that an integer value doesn't have
+A hash attribute with a key associated with every field. Specifies a
+filter that will be applied to the widget result data before it is put
+in the database. To make sure that an integer value doesn't have
 extraneous whitespace that could cause an error, do:
=20
 !block example
@@ -782,16 +788,141 @@
 it normally resides in lib/UI/profiles.
=20
 LI1: force_defaults
+
+Causes the entries in the "defaults" hash to be used to set the initial
+value of fields, disabling the preference for data coming from an
+existing record in the database.
+
 LI1: form_extra
+
+Extra information (usually scripting event calls) for the form. For instan=
ce,
+if you are maintaining a series of event monitors in and want to make sure
+the user knows that some changes will be lost, you can set up a routine
+named C<check_change()> in JavaScript. To check the change and ask for
+a confirmation before submission, you can do:
+
+!block example
+  <script>
+  var changed =3D new Array;
+  function is_changed (element) {
+	if(element !=3D undefined)
+		changed[changed.length] =3D element.name;
+  }
+
+  function check_change () {
+	if(changed.length > 0)=20
+	  return
+	  	confirm('the ' + changed.join(',') + ' elements were changed. Continue=
?');
+	return true;
+  }
+  </script>
+
+  [table-editor
+	foo.widget=3Dtext_50
+	foo.label=3D"Important stuff"
+	foo.extra=3D'onChange=3D"is_changed(this)"
+	form_extra=3D'onSubmit=3D"return check_change()"'
+  /]
+!endblock
+
+You could also pass style information if that is ever appropriate. For
+form name, action, and target,=20
+
 LI1: form_name
+
+The name of the form. Do not include the C<NAME=3D> portion, that is provi=
ded.
+Results in outputted HTML of:
+
+!block example
+	<FORM ACTION=3D"$opt->{form_action}" METHOD=3DPOST NAME=3D"$opt->{form_na=
me}">
+!endblock
+
 LI1: get
+
+Sets the method for the form to GET -- the default is POST.
+
 LI1: height
+
+A hash attribute with a key associated with every field. Sets the
+height of the widget if that is appropriate -- for example, it sets
+the ROWS parameter of a TEXTAREA, the SIZE parameter of a SELECT,
+etc. Also acts on the combination widgets according to the behavior
+of Vend::Form.
+
+If you want to set the height of a cell, you should use the C<*_extra>
+parameters.
+
 LI1: help
+
+A hash attribute with a key associated with every field. Specifies inline =
help
+that should be shown in the right-hand (data) portion of a widget row.
+
 LI1: help_anchor
+
+Sets the text that is used to anchor the C<help_url> link. Default is C<he=
lp>.
+Can also be used to set an image if you want to use that instead:
+
+!block example
+  [table-editor
+  	table=3Dproducts
+	key=3Dos28004
+	help_anchor=3D'<img src=3D"question_mark.jpg" border=3D0>'
+  /]
+!endblock
+
+LI1: help_cell_class
+LI1: help_cell_style
+LI1: help_cell_valign
+LI1: help_cell_width
+LI1: help_cell_align
 LI1: help_cell_extra
+
+Sets the help cell attributes. See B<data_cell_extra>.
+
 LI1: help_url
+
+A URL which leads to extended help on a field. For example:
+
+!block example
+  [table-editor
+  	table=3Dproducts
+	key=3Dos28004
+	widget.foo=3Dtext_50
+	label.foo=3D"Important stuff"
+	help.foo=3D"This is a complex field."
+	help_anchor=3D"Search for more help"
+	help_url.foo=3D"http://www.google.com/search?q=3Dfoo"
+  /]
+!endblock
+
 LI1: hidden
+
+Allows setting of extra hidden variables in a form. This is a hash attribu=
te,
+with one key for every hidden variable you need to set.
+
+!block example
+  [table-editor
+  	table=3Dproducts
+	key=3Dos28004
+	hidden.foo=3Dbar
+	hidden.buz=3Dbaz
+  /]
+!endblock
+
+The above will include=20
+
+!block example
+	<input type=3D"hidden" name=3D"foo" value=3D"bar">
+	<input type=3D"hidden" name=3D"buz" value=3D"baz">
+!endblock
+
 LI1: href
+
+Sets the action for the form. By default it is {{CMD[jump=3D"icconfig.html=
#VendURL"]VendURL}}/ui,
+which checks for authorization for setting table records. If the C<secure=
=3D1>
+parameter is set, {{CMD[jump=3D"icconfig.html#SecureURL"]SecureURL}} will =
be used instead.
+parameter is set, the SecureURL
+the default=20
 LI1: include_before
 LI1: include_form
 LI1: inner_table_width