WashNGo-2.12.0.1: WASH is a family of EDSLs for programming Web applications in Haskell.

WASH.CGI.AbstractSelector

Synopsis

Documentation

data AT Source

abstract table (twodimensional)

Constructors

AT 

Fields

as_raw :: [[String]]
 
as_rows :: Int
 
as_cols :: Int
 

Instances

data AR Source

abstract row

Constructors

AR [String] 

Instances

getAR :: AT -> Int -> ARSource

table_io :: IO [[String]] -> CGI ATSource

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 ()Source

Access abstract table by row and column. Produces a test node in the document monad.

data SelectionGroup a x Source

a selection group is a virtual field that never appears on the screen, but gives rise to a hidden input field!

selectionGroup :: CGIMonad cgi => WithHTML y cgi (SelectionGroup AR INVALID)Source

Create a selection group for a table. Selects one row.

selectionButton :: CGIMonad cgi => SelectionGroup AR INVALID -> AT -> Int -> HTMLField cgi x y ()Source

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 aSource

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)Source

Create a choice group for a table (0-*).

choiceButton :: CGIMonad cgi => SelectionGroup [AR] INVALID -> AT -> Int -> HTMLField cgi x y ()Source

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 aSource

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.