happstack-dlg-0.1.2: Cross-request user interactions for HappstackSource codeContentsIndex
Happstack.Server.Dialogues.Scaffold
Synopsis
escapeHtml :: String -> String
scaffold :: (Scaffolded a, Monad m) => String -> a -> Dlg m a
class Scaffolded a where
render :: String -> a -> String
parse :: Monad m => String -> a -> ServerPartT m a
data Choice a = Choice [a] Int
toChoice :: (Bounded a, Enum a, Eq a) => a -> Choice a
fromChoice :: Choice a -> a
chooseFrom :: [a] -> Choice a
Documentation
escapeHtml :: String -> StringSource
scaffold :: (Scaffolded a, Monad m) => String -> a -> Dlg m aSource
The scaffold function builds a user interaction to display and collect information. In a finished web application, this should generally be replaced with a better mechanism for rendering pages, such as a templating engine, XSLT, or something of the sort.
class Scaffolded a whereSource
The Scaffolded type class represents data that can be included in a form. To make it easy to compose several of these in a page, rendering and parsing are parameterized with prefix strings so that they may be made unique across a page.
Methods
render :: String -> a -> StringSource
parse :: Monad m => String -> a -> ServerPartT m aSource
show/hide Instances
data Choice a Source
Wrapper type to present a list of options.
Constructors
Choice [a] Int
show/hide Instances
Show a => Show (Choice a)
(Eq a, Show a) => Scaffolded (Choice a)
toChoice :: (Bounded a, Enum a, Eq a) => a -> Choice aSource
fromChoice :: Choice a -> aSource
chooseFrom :: [a] -> Choice aSource
Produced by Haddock version 2.6.0