Plasma GitLab Archive
Projects Blog Knowledge


[UP]
Modules
 Wd_application_dtd
 Wd_cycle
 Wd_dialog
 Wd_dialog.dialog
 Wd_dialog.instant_session_manager
 Wd_dialog.database_session_manager
 Wd_dictionary
 Wd_encoding
 Wd_interactor
 Wd_run_cgi
 Wd_run_jserv
 Wd_run_fcgi
 Wd_stdlib
 Wd_template
 Wd_templrep
 Wd_transform
 Wd_types
 Wd_serialize_types
 Wd_universe
 Wd_upload
 Wd_var_functions
   
WDialog API for Objective Caml: Wd_dialog

Module Wd_dialog


module Wd_dialog: sig .. end
This module defines the base class dialog from which all dialog classes should inherit

val dump_interactors : Format.formatter -> Wd_types.interactors -> unit
Prints a readable description of the contents of the interactors argument to the passed formatter. This function is a valid printer for the toplevel and the debugger.
class virtual dialog : Wd_types.universe_type -> string -> Wd_types.environment -> object .. end
The class dialog is the implementation of Wd_types.dialog_type that should be used as base definition for all dialog objects.

Construction new dialog universe name env: Makes a new dialog called name which is bound to the universe

Normally, the class dialog is not used directly. It is intended to inherit from dialog, and to define the two methods prepare_page and handle; these are virtual in the base class:

class my_dialog universe name env =
object (self)
inherit dialog universe name env
method prepare_page = ...
method handle = ...
end

After defining such a class, you can create a new my_dialog by new my_dialog universe "my_dialog" env. However, it is not recommended to do it this way. The module Wd_universe includes a registry of constructors, and every dialog should put its constructor into it:

universe # register "my_dialog" (new my_dialog)

For example, you can place this statement where you call Wd_run_cgi.run:

let universe = new Wd_universe.universe in
universe # register ...;
Wd_run_cgi.run ... ~universe

After the dialog has been registered, you can create new instances of the dialog by calling universe#create:

let dlg = universe # create env "my_dialog"

class instant_session_manager : unit -> Wd_types.session_manager_type
The "instant" session manager serializes the state of the dialog, and includes it literally into the HTML form.
exception Invalid_session_checksum
Raised when the session checksum as stored in the database is not the same that is transmitted by the browser. This normally means that a historic page was submitted ("Back" button).
exception Session_not_found
Raises when the current session was not found in the database.
class database_session_manager : ?private_key:string -> ?enable_checksum:bool -> allocate:(unit -> int) -> insert:(int -> string -> unit) -> update:(int -> string -> string -> string -> unit) -> lookup:(int -> string -> string * string) -> unit -> Wd_types.session_manager_type
The database session manager allows it to store the contents of sessions in databases.
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml