Update of /cvsroot/phpwebapp/web_app/webobjects/form
In directory sc8-pr-cvs1:/tmp/cvs-serv5059/webobjects/form
Modified Files:
formWebObj.txt
Log Message:
Index: formWebObj.txt
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/webobjects/form/formWebObj.txt,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** formWebObj.txt 21 Feb 2003 08:17:06 -0000 1.1.1.1
--- formWebObj.txt 23 Feb 2003 14:20:31 -0000 1.2
***************
*** 1,58 ****
- -------- formWebObj ----------------------------------
- * - formWebObj is a webobject that makes easy the handling of big
- forms (which have many inputs) and their data connection to the
- databaze. It is used like this: when you have a webbox that
- has a big form, in the PHP code of the webbox you include the
- class 'formWebObj', and then inherit this class, instead of
- inheriting 'WebObject' ('formWebObj' itself extends 'WebObject',
- so this is OK). E.g.:
! <WebBox ID="editProject">
! <form name="bigForm">
! . . . . . . . .
! <!--# many <input>s, <select>s, etc. here #-->
! . . . . . . . .
! </form>
! </WebBox>
! ----------------------------------------------
! <?
! include_once FORM_PATH."formWebObj.php";
! class editProject extends formWebObj
! {
! . . . . . . . . . .
! }
! ?>
! ----------------------------------------------
! <?
! class formWebObj extends WebObject
! {
! . . . . . . . . . . .
! }
! ?>
! Then, in the JS code of the webbox you can use these JS functions
! which have been declared and included by the 'formWebObj':
!
! getEventArgs(form);
! /**
! * Returns all the data in the inputs of the given form
! * so that they can be sent as event args, e.g.
! * GoTo("thisPage?event=editProject.save(" + getEventArgs(form) + ")");
! */
! saveFormData(form);
! /**
! * Transmit the data of the form, so that
! * the changed values are not lost.
! * Must be called before GoTo().
! */
! This is useful when the page is refreshed for some reason,
! but you don't want to lose the values that are inputed in it.
!
! There are also these two functions that are used internally by
! 'formWebObj', but you can use them as well, if you need them:
! function getFormData(form)
! //returns all the data filled in the given form
! function setFormData(form, formData)
! //fills the form with the given data
--- 1,58 ----
! formWebObj is a webobject that makes easy the handling of big
! forms (which have many inputs) and their data connection to the
! databaze. It is used like this: when you have a webbox that
! has a big form, in the PHP code of the webbox you include the
! class 'formWebObj', and then inherit this class, instead of
! inheriting 'WebObject' ('formWebObj' itself extends 'WebObject',
! so this is OK). E.g.:
! <WebBox ID="editProject">
! <form name="bigForm">
! . . . . . . . .
! <!--# many <input>s, <select>s, etc. here #-->
! . . . . . . . .
! </form>
! </WebBox>
! ----------------------------------------------
! <?
! include_once FORM_PATH."formWebObj.php";
! class editProject extends formWebObj
! {
! . . . . . . . . . .
! }
! ?>
! ----------------------------------------------
! <?
! class formWebObj extends WebObject
! {
! . . . . . . . . . . .
! }
! ?>
! Then, in the JS code of the webbox you can use these JS functions
! which have been declared and included by the 'formWebObj':
!
! getEventArgs(form);
! /**
! * Returns all the data in the inputs of the given form
! * so that they can be sent as event args, e.g.
! * GoTo("thisPage?event=editProject.save(" + getEventArgs(form) + ")");
! */
!
! saveFormData(form);
! /**
! * Transmit the data of the form, so that
! * the changed values are not lost.
! * Must be called before GoTo().
! */
! This is useful when the page is refreshed for some reason,
! but you don't want to lose the values that are inputed in it.
!
! There are also these two functions that are used internally by
! 'formWebObj', but you can use them as well, if you need them:
! function getFormData(form)
! //returns all the data filled in the given form
! function setFormData(form, formData)
! //fills the form with the given data
|