|
|
|
|
|
Description |
Haskell98 version of the submission functions. |
|
Synopsis |
|
|
|
Documentation |
|
class InputHandle h |
| Instances | InputHandle (InputField a) | InputHandle F0 | InputHandle a => InputHandle (F1 a) | (InputHandle a, InputHandle b) => InputHandle (F2 a b) | (InputHandle a, InputHandle b, InputHandle c) => InputHandle (F3 a b c) | (InputHandle a, InputHandle b, InputHandle c, InputHandle d) => InputHandle (F4 a b c d) | (InputHandle a, InputHandle b, InputHandle c, InputHandle d, InputHandle e) => InputHandle (F5 a b c d e) | (InputHandle a, InputHandle b, InputHandle c, InputHandle d, InputHandle e, InputHandle f) => InputHandle (F6 a b c d e f) | (InputHandle a, InputHandle b, InputHandle c, InputHandle d, InputHandle e, InputHandle f, InputHandle g) => InputHandle (F7 a b c d e f g) | (InputHandle a, InputHandle b, InputHandle c, InputHandle d, InputHandle e, InputHandle f, InputHandle g, InputHandle h) => InputHandle (F8 a b c d e f g h) | InputHandle a => InputHandle (FL a) | InputHandle b => InputHandle (FA a b) | InputHandle (RadioGroup a) | InputHandle (SelectionGroup a) |
|
|
|
class HasValue i where |
|
|
data F0 x |
|
|
data F1 a x |
|
|
data F2 a b x |
|
|
data F3 a b c x |
|
|
data F4 a b c d x |
Constructors | F4 (a x) (b x) (c x) (d x) | |
| Instances | |
|
|
data F5 a b c d e x |
Constructors | F5 (a x) (b x) (c x) (d x) (e x) | |
| Instances | |
|
|
data F6 a b c d e f x |
Constructors | F6 (a x) (b x) (c x) (d x) (e x) (f x) | |
| Instances | |
|
|
data F7 a b c d e f g x |
Constructors | F7 (a x) (b x) (c x) (d x) (e x) (f x) (g x) | |
| Instances | |
|
|
data F8 a b c d e f g h x |
Constructors | F8 (a x) (b x) (c x) (d x) (e x) (f x) (g x) (h x) | |
| Instances | |
|
|
data FL a x |
FL is required to pass an unknown number of handles of the same
type need to the callback function in a form submission. The
handles need to be collected in a list and then wrapped in the FL data constructor | Constructors | | Instances | |
|
|
data FA a b x |
FA comes handy when you want to tag an input handle with some extra
information, which is not itsefl an input handle and which is not validated
by a form submission. The tag is the first argument and the handle is the
second argument of the data constructor. | Constructors | | Instances | |
|
|
submit |
:: InputHandle h | | => h INVALID | input field handles to be validated and passed to callback action | -> (h VALID -> CGI ()) | callback maps valid input handles to a CGI action | -> HTMLField x y () | returns a field so that attributes can be attached | Create a submission button with attached action. |
|
|
submit0 :: CGI () -> HTMLField x y () |
Create a continuation button that takes no parameters. |
|
defaultSubmit :: InputHandle h => h INVALID -> (h VALID -> CGI ()) -> HTMLField x y () |
Create a submission button whose attached action is fired whenever the form
is submitted without explicitly clicking any submit button. This can happen if
an input field has an attached onclick=submit() action. |
|
data DTree x y |
Abstract type of decisions trees. These trees provide structured validation. |
|
|
submitx :: DTree x y -> HTMLField x y () |
Create a submission button whose validation proceeds according to a decision
tree. Trees are built using dtleaf and dtnode. |
|
dtleaf :: CGI () -> DTree x y |
Create a leaf in a decision tree from a CGI action. |
|
dtnode :: InputHandle h => h INVALID -> (h VALID -> DTree x y) -> DTree x y |
Create a node in a decision tree. Takes an invalid input field and a
continuation. Validates the input field and passes it to the continuation if
the validation was successful. The continuation can dispatch on the value of
the input field and produces a new decision tree. |
|
submitLink :: InputHandle h => h INVALID -> (h VALID -> CGI ()) -> HTMLCons x y CGI () |
Create an ordinary link serving as a submission button. |
|
submitLink0 :: CGI () -> HTMLCons x y CGI () |
Create a continuation link. |
|
defaultSubmitLink :: InputHandle h => h INVALID -> (h VALID -> CGI ()) -> HTMLCons x y CGI () |
|
activate :: (InputHandle (i a), HasValue i) => (a -> CGI ()) -> HTMLField x y (i a INVALID) -> HTMLField x y (i a INVALID) |
Attach a CGI action to the value returned by the input field. Activation
means that data is submitted as soon as it is entered. |
|
Produced by Haddock version 0.6 |