An abstracted result from asking the user for a value via a web interface.
An abstracted result from asking the user for a value via a web interface. Each web interpreter will want to convert this into it's own representation
Defines both the rendering and the encoding for a given datatype
A codec for a datatype to make it usable as a form field inside a uniform web interpreter.
A codec for a datatype to make it usable as a form field inside a
uniform web interpreter. Technically this is a split epimorphism between
Input => Either[ErrorTree,A]
and A => Input
.
Controls the rendering of a field in a web form
Represents rendering a type for a tell
interaction used in a web
interpreter
Produces pages for List[A]
where a user can enter multiple items
of a given datatype via a central page that enumerates the items
already, allows them to add new items and edit or delete existing ones.
Produces pages for List[A]
where a user can enter multiple items
of a given datatype via a central page that enumerates the items
already, allows them to add new items and edit or delete existing ones.
There are two ways you can produce a listing - the first works by
infering the page for A
automatically. To use this approach
simply use an ask[List[A]]
in your journey and it will pick up
and use the add/edit part from inference, falling back to
InferFormField
if necessary.
The second approach works by explicitly supplying a subjourney and
interpreting this into a WebMonadConstructor, by using the
listingPageWM
method.
fast forward to the first empty question in a journey
when asking for list A with a minimum number of A required then go straight to add A subjourney rather than to the empty listing index page
A representation of how to render a listing of a type of object
The combined output of web execution
The data type returned form the branching part of a listing page.
Returns a relative path as used in a URI or *nix directory - with '..' used to denote navigating up one element in the tree.
Returns a relative path as used in a URI or *nix directory - with '..' used to denote navigating up one element in the tree.
scala> relativePath(List("1","2"),{1 to 5}.map{_.toString}.toList) res0: String = 3/4/5 scala> relativePath(List("1","other","thing"),{1 to 5}.map{_.toString}.toList) res1: String = ../2/3/4/5
Returns the lists given as arguments with any sequence common to the two removed from the start
Returns the lists given as arguments with any sequence common to the two removed from the start
scala> removeCommon({1 to 5}.toList, List(1,2)) res0: (List[Int], List[Int]) = (List(3, 4, 5),List())