package sihl
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=8a2754d6e5b9eafb8ff332abdb1ceb7d
sha512=3230a1315686b0b6f90a41ceda27ab036e178184ab13d5a98f64d6d987caf4a8a5d94ed78bc8e79b0ee3b40ccbb1dbdc71ffe171f1aef1f18aba81fc720e3a1b
doc/sihl/Sihl/Web/Rest/module-type-VIEW/index.html
Module type Rest.VIEWSource
The VIEW interface needs to be implemented by a module that renders HTML.
t is the type of the resource.
skip_index_fetch can be set to true if you want to take care of fetching the collection yourself. This is useful when the search function of the service is not powerful enough and you need to implement your own collection fetching.
val index :
Request.t ->
string ->
(t list * int) ->
query ->
[> Html_types.html ] Tyxml.Html.elt Lwt.tindex request csrf resources returns a list of resource instances as HTML.
You can access the original request directly if needed.
The csrf token has to be included as hidden input element in the form.
new' request csrf form returns a form to create new instances of the resource as HTML.
You can access the original request directly if needed.
csrf token has to be included as hidden input element in the form.
form is the decoded and validated form from a previous request. It contains input names, submitted values and error messages. This is useful to display error messages on input elements or to populate the form with invalid input from the failed create request, so the user can fix it.
show request resource returns the resource instance as HTML. This is the detail view of an instance of the resource.
edit request csrf form returns a form to edit an instance of the resource instance as HTML.
You can access the original request directly if needed.
csrf token has to be included as hidden input element in the form.
form is the decoded and validated form from a previous request. It contains input names, submitted values and error messages. This is useful to display error messages on input elements or to populate the form with invalid input from the failed create request, so the user can fix it.