WashNGo-2.12: WASH is a family of embedded domain specific languages (EDSL) for programming Web applications in Haskell.ContentsIndex
WASH.CGI.AbstractSelector
Synopsis
data AT = AT {
as_raw :: [[String]]
as_rows :: Int
as_cols :: Int
}
data AR = AR [String]
getAR :: AT -> Int -> AR
unAR :: AR -> [String]
table_io :: IO [[String]] -> CGI AT
getText :: Monad m => AT -> Int -> Int -> WithHTML x m ()
data SelectionGroup a x = SelectionGroup {
selectionName :: String
selectionToken :: CGIFieldName
selectionString :: (Maybe String)
selectionValue :: (Maybe a)
selectionBound :: Bool
}
selectionGroup :: CGIMonad cgi => WithHTML y cgi (SelectionGroup AR INVALID)
selectionButton :: CGIMonad cgi => SelectionGroup AR INVALID -> AT -> Int -> HTMLField cgi x y ()
selectionDisplay :: CGIMonad cgi => SelectionGroup AR INVALID -> AT -> Int -> (WithHTML x cgi () -> [WithHTML x cgi ()] -> WithHTML x cgi a) -> WithHTML x cgi a
choiceGroup :: CGIMonad cgi => WithHTML x cgi (SelectionGroup [AR] INVALID)
choiceButton :: CGIMonad cgi => SelectionGroup [AR] INVALID -> AT -> Int -> HTMLField cgi x y ()
choiceDisplay :: CGIMonad cgi => SelectionGroup [AR] INVALID -> AT -> Int -> (WithHTML x cgi () -> [WithHTML x cgi ()] -> WithHTML x cgi a) -> WithHTML x cgi a
Documentation
data AT
abstract table (twodimensional)
Constructors
AT
as_raw :: [[String]]
as_rows :: Int
as_cols :: Int
show/hide Instances
data AR
abstract row
Constructors
AR [String]
show/hide Instances
getAR :: AT -> Int -> AR
unAR :: AR -> [String]
table_io :: IO [[String]] -> CGI AT
Transform an IO action that produces a table in list form into a CGI action that returns an abstract table.
getText :: Monad m => AT -> Int -> Int -> WithHTML x m ()
Access abstract table by row and column. Produces a test node in the document monad.
data SelectionGroup a x
a selection group is a virtual field that never appears on the screen, but gives rise to a hidden input field!
Constructors
SelectionGroup
selectionName :: String
selectionToken :: CGIFieldName
selectionString :: (Maybe String)
selectionValue :: (Maybe a)
selectionBound :: Bool
show/hide Instances
selectionGroup :: CGIMonad cgi => WithHTML y cgi (SelectionGroup AR INVALID)
Create a selection group for a table. Selects one row.
selectionButton :: CGIMonad cgi => SelectionGroup AR INVALID -> AT -> Int -> HTMLField cgi x y ()
Create a selection button for an abstract table
selectionDisplay :: CGIMonad cgi => SelectionGroup AR INVALID -> AT -> Int -> (WithHTML x cgi () -> [WithHTML x cgi ()] -> WithHTML x cgi a) -> WithHTML x cgi a
Create a labelled selection display for an abstract table. The display function takes the button element and a list of text nodes corresponding to the selected row and is expected to perform the layout.
choiceGroup :: CGIMonad cgi => WithHTML x cgi (SelectionGroup [AR] INVALID)
Create a choice group for a table (0-*).
choiceButton :: CGIMonad cgi => SelectionGroup [AR] INVALID -> AT -> Int -> HTMLField cgi x y ()
Create one choice button for an abstract table
choiceDisplay :: CGIMonad cgi => SelectionGroup [AR] INVALID -> AT -> Int -> (WithHTML x cgi () -> [WithHTML x cgi ()] -> WithHTML x cgi a) -> WithHTML x cgi a
Create a labelled choice display for an abstract table. The display function takes the button element and a list of text nodes corresponding to the selected row and is expected to perform the layout.
Produced by Haddock version 0.8