module Xhtml:sig..end
typepage =Xhtmltypes.xhtml XHTML.M.elt
val register_service : service:('a, 'b, [ `Internal_Service of 'c ],
[< `WithSuffix | `WithoutSuffix ], 'd, 'e)
Ocsigen.service ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> 'b -> page Lwt.t) -> unitregister_service service t f will associate the service service to the function f.
f is the function that creates a page.
It takes three parameters. The first one has type server_params
and allows to have acces to informations about the request.
The second and third ones are respectively GET and POST parameters.
For example if t is (int "s"), then 'a is int.val register_service_for_session : Ocsigen.server_params ->
service:('a, 'b, [ `Internal_Service of 'c ],
[< `WithSuffix | `WithoutSuffix ], 'd, 'e)
Ocsigen.service ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> 'b -> page Lwt.t) -> unitWarning:
val register_new_service : url:Ocsigen.url_path ->
?prefix:bool ->
get_params:('a, [< `WithSuffix | `WithoutSuffix ] as 'b, 'c)
Ocsigen.params_type ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit, [ `Internal_Service of [ `Public_Service ] ], 'b, 'c,
unit Ocsigen.param_name)
Ocsigen.servicenew_service followed by register_serviceval register_new_auxiliary_service : fallback:('a, unit, [ `Internal_Service of [ `Public_Service ] ],
[< `WithSuffix | `WithoutSuffix ] as 'b, 'c, 'd)
Ocsigen.service ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit, [ `Internal_Service of [ `Local_Service ] ], 'b, 'c, 'd)
Ocsigen.servicenew_auxiliary_service followed by register_serviceval register_new_auxiliary_service_for_session : Ocsigen.server_params ->
fallback:('a, unit, [ `Internal_Service of [ `Public_Service ] ],
[< `WithSuffix | `WithoutSuffix ] as 'b, 'c, 'd)
Ocsigen.service ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> unit -> page Lwt.t) ->
('a, unit, [ `Internal_Service of [ `Local_Service ] ], 'b, 'c, 'd)
Ocsigen.servicenew_auxiliary_service followed by register_service_for_sessionval register_new_post_service : fallback:('a, unit, [ `Internal_Service of [ `Public_Service ] ],
[< `WithSuffix | `WithoutSuffix ] as 'b, 'c,
unit Ocsigen.param_name)
Ocsigen.service ->
post_params:('d, [ `WithoutSuffix ], 'e) Ocsigen.params_type ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> 'd -> page Lwt.t) ->
('a, 'd, [ `Internal_Service of [ `Public_Service ] ], 'b, 'c, 'e)
Ocsigen.servicenew_post_service followed by register_post_serviceval register_new_post_auxiliary_service : fallback:('a, 'b, [ `Internal_Service of [ `Public_Service ] ],
[< `WithSuffix | `WithoutSuffix ] as 'c, 'd, 'e)
Ocsigen.service ->
post_params:('f, [ `WithoutSuffix ], 'g) Ocsigen.params_type ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> 'f -> page Lwt.t) ->
('a, 'f, [ `Internal_Service of [ `Local_Service ] ], 'c, 'd, 'g)
Ocsigen.servicenew_post_auxiliary_service followed by register_post_serviceval register_new_post_auxiliary_service_for_session : Ocsigen.server_params ->
fallback:('a, 'b, [ `Internal_Service of [ `Public_Service ] ],
[< `WithSuffix | `WithoutSuffix ] as 'c, 'd, 'e)
Ocsigen.service ->
post_params:('f, [ `WithoutSuffix ], 'g) Ocsigen.params_type ->
?error_handler:(Ocsigen.server_params ->
(string * exn) list -> page Lwt.t) ->
(Ocsigen.server_params -> 'a -> 'f -> page Lwt.t) ->
('a, 'f, [ `Internal_Service of [ `Local_Service ] ], 'c, 'd, 'g)
Ocsigen.servicenew_post_auxiliary_service followed by register_post_service_for_sessionval a : ?a:Xhtmltypes.a_attrib XHTML.M.attrib list ->
('a, unit, 'b, [< `WithSuffix | `WithoutSuffix ], 'c,
unit Ocsigen.param_name)
Ocsigen.service ->
Ocsigen.server_params ->
Xhtmltypes.a_content XHTML.M.elt list -> 'a -> [> Xhtmltypes.a ] XHTML.M.elta service sp cont () creates a link from current to service.
The text of
the link is cont. For example cont may be something like
[pcdata "click here"].
The last parameter is for GET parameters.
For example a service sp cont (42,"hello")
The ~a optional parameter is used for extra attributes
(see the module XHTML.M)
val css_link : ?a:Xhtmltypes.link_attrib XHTML.M.attrib list ->
XHTML.M.uri -> [> Xhtmltypes.link ] XHTML.M.elt<link> tag for a Cascading StyleSheet (CSS).val js_script : ?a:Xhtmltypes.script_attrib XHTML.M.attrib list ->
XHTML.M.uri -> [> Xhtmltypes.script ] XHTML.M.elt<script> tag to add a javascript fileval make_uri : ('a, unit, 'b, [< `WithSuffix | `WithoutSuffix ], 'c, 'd) Ocsigen.service ->
Ocsigen.server_params -> 'a -> XHTML.M.uria function, it may take
extra parameters.val get_form : ?a:Xhtmltypes.form_attrib XHTML.M.attrib list ->
('a, unit, 'b, 'c, 'd, unit Ocsigen.param_name) Ocsigen.service ->
Ocsigen.server_params ->
('d -> Xhtmltypes.form_content XHTML.M.elt list) ->
[> Xhtmltypes.form ] XHTML.M.eltget_form service current formgen creates a GET form from current to service.
The content of
the form is generated by the function formgen, that takes the names
of page parameters as parameters.val post_form : ?a:Xhtmltypes.form_attrib XHTML.M.attrib list ->
('a, 'b, 'c, [< `WithSuffix | `WithoutSuffix ], 'd, 'e) Ocsigen.service ->
Ocsigen.server_params ->
('e -> Xhtmltypes.form_content XHTML.M.elt list) ->
'a -> [> Xhtmltypes.form ] XHTML.M.eltpost_form service current formgen creates a POST form from current
to service. The last parameter is for GET parameters (as in the function a).val int_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:int -> int Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for an integerval float_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:float -> float Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for a floatval string_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:string ->
string Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for a stringval user_type_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:'a ->
('a -> string) -> 'a Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for a user typeval int_password_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:int -> int Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input type="password"> tag for an integerval float_password_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:float -> float Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input type="password"> tag for a floatval string_password_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:string ->
string Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input type="password"> tag for a stringval user_type_password_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:'a ->
('a -> string) -> 'a Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input type="password"> tag for a user typeval hidden_int_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
int Ocsigen.param_name -> int -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for an integerval hidden_float_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
float Ocsigen.param_name -> float -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for a floatval hidden_string_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
string Ocsigen.param_name -> string -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for a stringval hidden_user_type_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
('a -> string) ->
'a Ocsigen.param_name -> 'a -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag for a user typeval bool_checkbox : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?checked:bool -> bool Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.elt<input> tagval string_radio : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?checked:bool ->
string option Ocsigen.param_name ->
string -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag with string contentval int_radio : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?checked:bool ->
int option Ocsigen.param_name -> int -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag with int contentval float_radio : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?checked:bool ->
float option Ocsigen.param_name -> float -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag with float contentval user_type_radio : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?checked:bool ->
('a -> string) ->
'a option Ocsigen.param_name -> 'a -> [> Xhtmltypes.input ] XHTML.M.elt<input> tag with user_type contentval textarea : ?a:Xhtmltypes.textarea_attrib XHTML.M.attrib list ->
string Ocsigen.param_name ->
rows:XHTML.M.number ->
cols:XHTML.M.number ->
[ `PCDATA ] XHTML.M.elt -> [> Xhtmltypes.textarea ] XHTML.M.elt<textarea> tagval select : ?a:Xhtmltypes.select_attrib XHTML.M.attrib list ->
?selected:(string option * string) option ->
string option * string ->
(string option * string) list ->
string Ocsigen.param_name -> [> Xhtmltypes.select ] XHTML.M.elt<select> tag.
The associated parameter is of type "string". It is used in forms as for example:
select (None, "inconnue") [(None, "C1"); (None, "C2")] classe
where "classe" is the parameter name. The different choices are of the form
(<optional string1>, <string2>). "string2" is presented to the user and
if selected it is the returned value except when "string1" is present
(where it is "string1"). It is modeled after the way "select" is done in
HTML.
Not all features of "select" are implemented.
val submit_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
string -> [> Xhtmltypes.input ] XHTML.M.elt<input> tagval file_input : ?a:Xhtmltypes.input_attrib XHTML.M.attrib list ->
?value:string ->
Extensions.file_info Ocsigen.param_name -> [> Xhtmltypes.input ] XHTML.M.eltval action_a : ?a:Xhtmltypes.a_attrib XHTML.M.attrib list ->
?reload:bool ->
('a, 'b) Ocsigen.action ->
Ocsigen.server_params ->
Xhtmltypes.a_content XHTML.M.elt list -> [> Xhtmltypes.form ] XHTML.M.eltaction).
If ~reload:false is specified, the current page will not be reloaded.val action_form : ?a:Xhtmltypes.form_attrib XHTML.M.attrib list ->
?reload:bool ->
('a, 'b) Ocsigen.action ->
Ocsigen.server_params ->
('b -> Xhtmltypes.form_content XHTML.M.elt list) ->
[> Xhtmltypes.form ] XHTML.M.eltaction).
If ~reload:false is specified, the current page will not be reloaded.