| Messages |
Some heitml components can be remote controlled. When linking to a page with such a component, a message for the component can be included. This message requests the component to perform a certain action.
For example possible messages for a dbform are empty to clear the form or display to display a certain record in the form. Display gets a record key as parameter.
A message is always addressed to a specific component, identified by the oid parameter of the component. The message contains a message kind of and possibly some parameters.
heitml contains components that accept messages, Receivers and components that send messages, Senders.
Message Transmission
There are two ways to transmit a message. A very common one is to pass on a message as URL parameters. This works fine but always bears the risk that the parameters are changed in an unintended way by unauthorized person.
Suppose you have a simple application listing certain database records and linking to them. The link sends a message to a dbform to display a certain record, including the key of the record as URL parameters. It is no problem for anybody using your application to change the URL to point to another database record. So in this setup anybody can explore all your data, not only the records that are listed ! This might not be a problem for a public database but if there are records that should not be public, used heitmls secure message mechanism.
The secure message transmission stores the message itself in the session memory and only uses a number to identify the message in the URL. Use the secure sender components to send secure messages.
Per default heitml components accept secure messages only.
Using the
Receivers
Components like dbform, dbscroller, dbcontainer and dbdisplay accept messages. The documentation below and the component reference list all messages accepted.
Senders
There are various sender components. msglink creates a link. When clicked on it sends the message. dlink must be used on a panel. It works like msglink but includes field values from the panel as parameters. So a dlink can be used to link to another related database record. dbselectlink is similar but is used as a column of a dbdisplay.
For all these messages there are secure counterparts: iamsglink, iadlink, iadbselectlink. Additionally there dbquerybutton. Use it on a sesform to send all the form fields as message. This is very useful to create search forms.
| Reference |
Receivers
The following components accept messages. The following documentation explains what messages are accepted and what actions they perform.
Component:dbformDetails
Messages
| Kind | Description |
| empty | Displays an empty form. Any field values included in the message are takes as default values of the form. |
| display | Displays a database record in a disabled form. Requires a key of the record as parameter. The key must consist of one or more fields. All field names provided must be legal column names found in the database. |
| modify | Displays a database record in an enabled form. Parameters are the same as with display. |
| searchdisplay | Works like display but performs an automatic query search. The key fields of the messages are compared with the fields of the same name contained in the database. Default comparison operator is a substring match (like "%...%"). Other operators can be selected using dbfieldoperator in a search form. |
| searchmodify | Works like modify but performs an automatic query search. The key fields of the messages are compared with the fields of the same name contained in the database. Default comparison operator is a substring match (like "%...%"). Other operators can be selected using dbfieldoperator in a search form. |
| copy | Displays a copy of a database record in an enabled form. Parameters are the same as with modify. |
Component:dbscrollerDetails
Messages
| Kind | Description |
| search | Automatic query search. The key fields of the messages are compared with the fields of the same name contained in the database. Default comparison operator is like "%...%". Other operators can be selected using dbfieldoperator. |
| query | Query search. The query can use dbqueryfield to compare key fields with database fields. |
| display | Query search. The key fields of the message must be equal to the fields in the database with the same name. |
| clear | Clears the scrollers content. |
Component:dbcontainerDetails
Messages
| Kind | Description |
| clear | Clears the container and displays nothing. |
| display | Displays a database record. The key must consist of one or more fields. All field names provided must be legal column names found in the database. |
| search | Works as display, but fields are compared using like or a user specified operator (see dbfieldoperator). |
Component:dbdisplayDetails
Senders
Component:msglinkDetails Component:dlinkDetails Component:dbselectlinkDetails Component:iamsglinkDetails Component:iadlinkDetails Component:iadbselectlinkDetails Component:dbquerybuttonDetails
Normally all non-empty form fields are compared to the field
in the database with the same name. Only records that contain
the same field value match.
If
Using the
Link sending a message when pressed. This is often used to
trigger a dbform to show a certain database record.
You may add key fields using the AddProp function of the
Property
Kind
Description Href Destination URL Action Action to be performed by the dbform Receiver Destination Component Urlpar Parameters appended to the URL. (The ? part of the URL excluding th
e #). Target Target parameter for the link.
Link to another component to display the current record.
Property
Kind
Description Href Destination URL Action Action to be performed by the dbform Receiver Destination Component Key Key field used to identify the record Urlpar Parameters appended to the URL. (The ? part of the URL excluding the #). Target Target parameter for the link.
Link to another component to handle the current record.
Property
Kind
Description Href Destination URL Action Action to be performed by the Receiver Destination Component Key Key field used to identify the record.
Key can also be a comma separated list of key field
names. Field names can be preceded by 'targetname='
id the receiver uses different key field names.
Title Title of the Link column Width Width of the link column Bgcolor Table field parameters Align Valign Nowrap Urlpar Parameters appended to the URL. (The ? part of the URL excluding the #).
Link sending a message when pressed. This is often used to
trigger a dbform to show a certain database record.
You may add key fields using the AddProp function of the
Property
Kind
Description Href Destination URL. Action Action to be performed by the dbform. Receiver Destination Component.
Link to another component to display the current record.
Property
Kind
Description Href Destination URL. Action Action to be performed by the dbform. Receiver Destination Component. Key Key field used to identify the record.
Secure link to another component to handle the current record.
Property
Kind
Description Href Destination URL. Action Action to be performed by the dbform. Receiver Destination Component. Key Key field used to identify the record.
Key can also be a comma separated list of key field
names. Field names can be preceded by 'targetname='
id the receiver uses different key field names.
Title Title of the Link column. Width Width of the link column.
The querybutton can be used on a
Property
Kind
Description Receiver Component to send the message Name Button Name inside the form, must be unique. Layout Input is a standard HTML submit button, image shows an image on the button,
link creates a link (needs JavaScript), compatlink a link or button depending on the browser,
button an HTML4.0 button (must occur just once at end of form),
mbutton an HTML 4.0 button (needs JavaScript), and
compatbutton an HTML 4.0 button or normal button depending on the browser; more
Type Action to take by the receiver. Value Label on the Button Src Image Url, only used for layout=image Border Border Size, only used for layout=image
© 1996-2013 H.E.I. All Rights Reserved.