MFlow  Create and maintain dynamic Web applications as easy and fast as console applications
Thou shall not write request handlers
 This release: 11/06/2014.  agocorona@gmail.com (@agocorona) <>< . issues & bugs .  Mflow Source code,     source code of this site




CheckBoxes

Shows how the Checkboxes are programmed in MFlow


Running example

(in the light red box):
redgreenblue


Source code:

{-# OPTIONS -XCPP #-} 
module CheckBoxes ( checkBoxes) where

import Data.Monoid
-- #define ALONE -- to execute it alone, uncomment this
#ifdef ALONE
import MFlow.Wai.Blaze.Html.All
main= runNavigation "" $ transientNav checkBoxes
#else
import MFlow.Wai.Blaze.Html.All hiding(page)
import Menu
#endif

checkBoxes= do
   r <- page  $ getCheckBoxes((setCheckBox False "Red"   <++ b <<  "red")
                           <> (setCheckBox False "Green" <++ b <<  "green")
                           <> (setCheckBox False "blue"  <++ b <<  "blue"))
              <** submitButton "submit"


   page  $ p << ( show r ++ " selected")  ++> wlink () (p <<  " menu")


comments powered by Disqus