Doco Home Tools Home
dev_conf
IDS ACCESSES COMMITS FORMS 

Platypus Tools: PO Section in Configuration files

Presentation objects which are in the "presentation/" directory are in the PO section. Thus, the Welcome presentation object would be in section "PO.Welcome".

Presentation objects in subdirectories are in subsections. For example, a presentation object "Sales" in directory "presentation/reports/" would be in section "PO.reports.Sales".

The section for a presentation object contains the following names:

DIRECTORY
value is directory containing PO. Relative to presentation directory. Excludes leading and trailing '/'s.
INVOKEDBY [Optional]
value is a comma-separated list of POs which might invoke this PO. This is used for generating code to read the query string. The POs are specified by their name within the config's PO section: eg "Welcome,reports.Sales".
REDIRECTTO [Optional]
present implies a redirect-to at end of processing. Value is path of PO to redirect to.
REDIRECTLIST [Optional]
present implies a redirect-to if the access returned only one item. Value is a Java expression for the URL to redirect to. For example, "reports/CustomerResults.po" (including quotes), or fieldLotURL. Can be overridden in an ACCESSES section.
TEMPLATES [Optional]
if present, overrides global TEMPLATES value for this PO.

Accesses section

ACCESSES section contains a subsection for each database query (or similar) the business layer will have to do for this page.

ACCESSES.AccessName.ISUNIQUE [Default FALSE]
value other than "FALSE" implies exactly one record is expected back from the database. The value is used in the generated code as the expression for the ObjectId of the record. For example, if the ObjectId were in name "PersonOId" on the query string, ISUNIQUE should have the value "qsPersonOId".
ACCESSES.AccessName.PROTOTYPE
value is the ID attribute of the dynamic node which should be replicated for each record returned. This value is required if DATAFROM = DATABASE and ISUNIQUE = FALSE.
ACCESSES.AccessName.STRIPED [Default FALSE]
value TRUE generates code for alternating styles for alternating records. Usually, this gives table rows alternating colours.
ACCESSES.AccessName.QUERYARGCOUNT
value is the number of arguments to the access query method.
ACCESSES.AccessName.QUERYARGn
value is the name of the field specified in the nth argument to the query, starting from 0.
ACCESSES.AccessName.TABLE
is the Java-ised table name. This must match one of the table names in the DO section. The table indicates the base DO from which data is extracted.
ACCESSES.AccessName.REDIRECTLIST [Optional]
present implies override POs REDIRECTLIST value, just for this ACCESS.

Commits section

COMMITS [Optional] section contains a section for each database add/update in this page. This level contains a list of names, each name points to a COMMIT section.

COMMITS.CommitName.FORMS
value is a comma separated list of the FORMS this add/update sends to the database. Each FORM is specified by its fully qualified section name, eg "PO.Xxxx.FORM.MainForm". Note that NAMES duplicated in the list of FORMS will only appear once.
COMMITS.CommitName.EXCLUDE [Optional]
value is a comma separated list of INPUTS to be excluded from the COMMIT.
COMMITS.CommitName.EXTRA [Optional]
value is a comma separated list of extra arguments for the commit calls.
COMMITS.CommitName.DBINDEX [If appropriate]
value is the name of the argument which is the DB index, ie the ObjectId. The presence (or lack) of this value determines whether a add or update method is generated. NOTE: Use the name as it appears in the FORM -- eg "PersonId", not "qsPersonId".

Forms section

FORMS section contains a subsection for each form. Subsection names are the NAME attribute of the FORM. ASSUMPTION: all FORM tags have a NAME attribute.

Most of the fields in this section are descriptive, rather than configurable. In other words, these fields describe the prototype HTML, and should not be hand-edited.

However, the MULTIPLE field is configurable. It should be hand-edited (or added!) if required.

FORMS.FormName.ACTION [If in prototype]
value is the ACTION attribute of the FORM.
FORMS.FormName.ELEMENTS
section contains a subsection for each INPUT, TEXTAREA, SELECT element. RADIO button sets, and CHECKBOX sets, are special cases because they have identical NAME attributes. They are described below. (NB: Mostly, CHECKBOXes don't occur in sets.)
NOTE: Inputs that don't have a NAME attribute are given a name starting with an "_". Usually, these are SUBMIT inputs.
FORMS.FormName.ELEMENTS.ElementName.TYPE
value is the TYPE attribute (or TEXTAREA, or SELECT).
FORMS.FormName.ELEMENTS.ElementName.ID [If in prototype]
value is the ID attribute.
FORMS.FormName.ELEMENTS.ElementName.VALUE [If in prototype]
value is the VALUE attribute.
FORMS.FormName.ELEMENTS.ElementName.MULTIPLE [If appropriate]
presence of value indicates this prototype form element will be repeated arbitary times in the served page. Its value is the ID attribute of the dynamic tag containing the repeated block.
Note: currently (19Oct99), only the presence or absence of this field is used (but must be non-empty if present) - its value is ignored.
FORMS.FormName.ELEMENTS.ElementName.b0...
is the prefix used for the first button of a RADIO set. This section will have all the properties asociated with an individual RADIO button.
FORMS.FormName.ELEMENTS.ElementName.SET [CHECKBOXes only]
value is "TRUE" if there are several CHECKBOXes with the same NAME attribute. If this is so, the RADIO button prefix convention is used for each CHECKBOX. The value is "FALSE" if there is only one CHECKBOX with that NAME attribute.
FORMS.FormName.ELEMENTS.ElementName.OPTIONS.option0.VALUE [SELECT tags only]
value is the VALUE attribute of the first OPTION in the SELECT.
FORMS.FormName.ELEMENTS.ElementName.OPTIONS.option0.TEXT [SELECT tags only]
value is the text associated with the first OPTION in the SELECT.