table_edit
NAME
table_edit - user interface script to edit a content of an item of 'Table' content-type.
DESCRIPTION
This script
PARAMETERS USED
The csript uses the next HTTP request parameters
- ITEM_ID
- An item_id of an item to edit.
-
Required. The script can't be called to edit ``nothing''. To create an item go another way.
- SERVER
- A name of communiware-site the item to show at.
-
Required. Each item in the Commenuware have a sense at a site only, lonely items are senseless.
- FROM
-
A value of FROM parameteer must be comparable with a key column of a table to
edit (comparation will be done in sql-request, dates will be compared by
fdate-value - a result of
fdate()
function - but it could be changed later). -
This value specifies the lower margin of rows of the table to edit.
-
If this parameter is not specified, script will make default for DATE (now it is ``a week ago'') and NUMBER (now it is ``20 less, then TO value''), but it can't make default for STRING values.
- TO
- The same as FROM, specifies upper margin.
-
A default for DATE is ``tomorrow'', a default for NUMDER is 0.
- FROM.FMT TO.FMT
- FROM and TO fields should contain dates (if they are of type DATE) in standard Communiware format. These fields provide alternate representation, formatted according to specification in DATEFORMAT parameter.
- DATEFORMAT
- Specification of date format in the form, acceptable for Communiware::Date::parsedate (see docs for DE Input). Default is %m-%d-%y
-
This format would be used for all date input fields =item HELP
-
specifies item id which would be shown below the edit area.
CONTROLLING TABLEEDIT APPEARANCE
all the table and input elements in table edit have classes assigned, so you can use CSS to control its appearance.
Following classes are defined
- te_table
-
Table itself
- te_header
- Cells (TH tags) of table header.
- te_body1
- Cells (TD tags) and input fields (Input tags) of the editable lines in the odd rows of table
- te_body2
- Same for even rows
- te_new
- cells of the new rows of table
- te_delete
- checkboxes which marks row for delete
- te_button
- pushbuttons
- te_help
- text of the help message (enclosed into DIV tag)
- te_error
- Error messages.
- te_key
- Text (span tag) for non-editable key values
BUGS
This script would fail to edit range if table has a composite key.