digestive-functors-0.6.0.1: A practical formlet library

Safe HaskellNone

Text.Digestive.View

Contents

Synopsis

Documentation

data View v Source

Constructors

forall a m . Monad m => View 

Instances

Functor View 
Show v => Show (View v) 

Obtaining a view

getForm :: Monad m => Text -> Form v m a -> m (View v)Source

postForm :: Monad m => Text -> Form v m a -> Env m -> m (View v, Maybe a)Source

Operations on views

subViews :: View v -> [View v]Source

Returns all immediate subviews of a view

Querying a view

Low-level

absolutePath :: Text -> View v -> PathSource

Determine an absolute Path for a field in the form

absoluteRef :: Text -> View v -> TextSource

Determine an absolute path and call fromPath on it. Useful if you're writing a view library...

Form encoding

Input

fieldInputText :: forall v. Text -> View v -> TextSource

fieldInputChoice :: forall v. Text -> View v -> [(Text, v, Bool)]Source

Returns a list of (identifier, view, selected?)

fieldInputChoiceGroup :: forall v. Text -> View v -> [(Text, [(Text, v, Bool)])]Source

Returns a list of (groupName, [(identifier, view, selected?)])

fieldInputBool :: forall v. Text -> View v -> BoolSource

List subview

listSubViews :: forall v. Text -> View v -> [View v]Source

makeListSubViewSource

Arguments

:: Text

ref

-> Int

index to use for the subview

-> View v

list view

-> View v 

Creates a sub view

Errors

errors :: Text -> View v -> [v]Source

childErrors :: Text -> View v -> [v]Source

Debugging