Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options

[UP]
Reference
 Dialogs
 Data types
 Events
 Templates
 Session management and security
 Internationalization
 Output encodings
 Processing instructions
 The UI language
 The standard UI library
 WDialog API (O'Caml)
 Runtime models
   
Processing instructions

Processing instructions can be used to modify the way the UI definition is interpreted. Currently, all processing instructions must be directly contained in the ui:application element.

  • <?wd-debug-mode?>: In debug mode, the generated HTML code contains a number of comments showing the current state of the dialog. Although these comments are not rendered by browsers, you can view them by selecting the "View source code" function of the browser.

    The state is shown as a long XML expression, even including some inner comments to improve the readability. There are two styles to encode the XML expression:

    • <?wd-debug-mode partially-encoded?>: This is style is intended for browsers that do not decode text occuring in comments (e.g. Internet Explorer, Mozilla). Only "-->" is converted to "==>" to avoid that the outer comment is closed prematurely. This style is the default.

    • <?wd-debug-mode fully-encoded?>: This is style is intended for browsers that do decode text within comments (e.g. Netscape 4). The characters <, >, and & are converted to their escaped forms &lt;, &gt;, and &amp;, respectively.

  • <?wd-prototype-mode?>: In prototype mode, missing definitions for dialog classes are automatically added to the universe of dialog classes. These definitions are "empty", i.e. nothing is done in prepare_page, and nothing happens in handle. The prototype mode is useful to design dialogs without changing the program.

  • <?wd-onstartup-call-handle?>: This mode forces that the handle method is called even if no event has been recognized. Normally, the handle method is not called in such cases.

    When the application is started, i.e. the user has typed in the URL, there is no event, and because of this normally the first action is to prepare the first page to display. This processing instruction changes the behaviour, and the first invoked method is handle, followed by prepare_page.

    Another possible situation is that Javascript statements submit the current form, and the WDialog routines do not detect that one of the defined events (from ui:button elements etc.) have happened. Normally, the invocation of handle is omitted unless this processing instruction forces its execution.

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml