[UP] The UI language |
The element ui:dialog An ui:dialog element describes the object behind a series of interactions (dialog) that base on shared state variables. The object has the following properties:
The programmer can associate an O'Caml or Perl class to the object, and this class is then treated as extension to the default behaviour of the object. You can find detailed descriptions of the dialog properties in the chapter about dialogs. Declaration Level: Dialog structure <!ELEMENT ui:dialog ( ( ui:enumeration | ui:variable | ui:context | ui:page )* ) > <!ATTLIST ui:dialog name NMTOKEN #REQUIRED start-page NMTOKEN #REQUIRED lang-variable NMTOKEN #IMPLIED >Restrictions: There must at most only one ui:context sub element. There must be at least the ui:page mentioned by start-page. Attributes
Sub elements The following sub elements may be contained in ui:dialog in arbitrary order:
Example <ui:dialog name="name_dialog" start-page="change_name"> <ui:variable name="first_name" type="string"/> <ui:variable name="last_name" type="string"/> <ui:page name="change_name"> <html> <body> <h1>Please enter your name here:</h1> <table> <tr> <td>First name:</td> <td><ui:text variable="first_name"/></td> </tr> <tr> <td>Last name:</td> <td><ui:text variable="last_name"/></td> </tr> </table> <p><ui:button name="name_changed" label="Done" goto="show_name"/></p> </body> </html> </ui:page> <ui:page name="show_name"> <html> <body> <h1>Welcome!</h1> Welcome, <ui:dynamic variable="first_name"/> <ui:dynamic variable="last_name"/>! </body> </html> </ui:page> </ui:dialog> |