Binding
Binding of Data and Function Objects to HTML resources is described below. The AML XHTML Extension defines the additional attributes used in binding these objects to XHTML elements.
Binding Data Objects | |
| Description | |
| Data Objects are able to be bound to the values and attributes of an html element using the Meta defined AM_data_id attribute. Meta uses the value of AM_data_id attribute to determine what and how the Data Meta Object(s) should be bound to the element. Changes made to the element are automatically reflected in the Data Meta Object and visa versa. | |
| Syntax | |
| Parameters | |
| type | (required). One of the following: a-attribute_name bound to attribute specified by the attribute name portion t bound to element value h bound to element value as html p specific to the <param> element of the <object> element. In this case the data object being a 2 dimensional array with the first column being the parameter name and second being the parameter value. m bound to element as a outer html value allowing aggregation of elements. |
| id | (required). Meta Object identifier |
| {row} | (optional). Zero based row index of array data object item. |
| {col} | (optional). Zero based column index of array Data Meta Object item. |
| Comments | |
| Multiple Data Objects can be bound to different parts of the same element by combinations of the above. Refer the example below. | |
| Example | |
| This example shows binding three Data Objects with identifiers - did_href, did_title and did_value to the href and title attributes as well as the value of a hypertext link < a > html element. | |
top
Binding Function Objects | |
| Description | |
| Function Objects are able to be bound to the events raised by a html element using the Meta defined AM_function_id attribute. | |
| Syntax | |
| Parameters | |
| event | (required). Event raised by the element which causes the function object to Run. One of the following: mc - mouse click md - mouse down mu - mouse up vk_enter - enter Key vk_down - down arrow Key vk_up - up arrow Key Key - any Key |
| id | (required). Meta Object Identifier |
| Example | |
| This example runs a Function Meta Object with an identifier of fid_go in response to <div> element being clicked. | |
top