Dinamic formlets are composable in MFlow ... But the entire page must be refreshed to achieve dynamic behavior. The next step is to try to avoid the need to refreshing the entire page by using ajax to refresh just the widget that has changed. ...
Now I did it with
autoRefresh :: View format monad result -> View format monad result
This example, from https://github.com/agocorona/MFlow/blob/head/Demos/demos.blaze.hs :
combination = ask $ p << "Login widget (use admin/admin)" ++> autoRefresh(pageFlow "r" wlogin) <++ hr **> p << "Counter widget" ++> autoRefresh (pageFlow "c" (counterWidget 0)) <++ hr **> p << "Dynamic form widget" ++> autoRefresh(pageFlow "f" formWidget) <++ hr **> wlink () << b << "exit"
Has three active widgets (monadic formlets) with autoRefresh : A login widget, a counter and the dynamic form. They are examples defined in the previous posts. Each of these widgets express his own flow within the page.