On Wed, Jan 26, 2011 at 4:33 PM, Corentin Dupont
wrote:
> Now turning to digestive functors, I don't see where do goes the "A.action
> actionURL" part that was in traditionnal forms?
> It seems I need it for routing the result of the form.
I think you will find formHtml is returning you the stuf
Hello,
I think you should just be able to use showURL to convert the url type
into a String that you can use with blaze-html:
data SiteURL = Post_Login | etc
loginForm :: RoutedNomicServer Html
loginForm = do
actionURL <- showURL Post_Login
ok $ H.form ! A.method "POST" ! A.action actionUR
Hello Jeremy,
Yes it would be fine to use solution 1, but I just don't figured how to mix
web routes and forms.
My forms are like that:
loginForm :: RoutedNomicServer Html
loginForm = do
ok $ H.form ! A.method "POST" ! A.action "/postLogin" ! enctype
"multipart/form-data;charset=UTF-8" $ do
Hello,
I believe you problem is because you are trying to use 'dir' inside
RouteT after you have already consumed and decode the path info using
implSite.
There are two solutions here:
1. just use web-routes for all your URLs instead of using a mixture
of type-safe routes and 'dir'.
2. put the
Hello,
I forgot to upload the version with the fixed type of `submit`. It is
on hackage now as digestive-functors-blaze-0.0.2.1.
Cheers,
Jasper
On Fri, Jan 21, 2011 at 9:33 PM, Corentin Dupont
wrote:
> Hello Jeremy,
> I'm still trying to integrate web routes, but there is one thing I don't
> un
Hello Jeremy,
I'm still trying to integrate web routes, but there is one thing I don't
understand:
how to deal with multiple forms?
In my former application, each forms used to redirect to a subdirectory of
the web site, and an appropriate handler was waiting there.
But now with web routes I don't
Thanks Jeremy.
I had it to work now ;)
Corentin
On Tue, Jan 18, 2011 at 6:01 PM, Jeremy Shaw wrote:
> Hello,
>
> trhsx will be installed in ~/.cabal/bin, so you will need to add that
> to your PATH.
>
> In order to use the demo code I provided you would need the latest
> happstack from darcs be
Hello,
trhsx will be installed in ~/.cabal/bin, so you will need to add that
to your PATH.
In order to use the demo code I provided you would need the latest
happstack from darcs because it contains a few differences in the API.
The code can be made to work with what is on hackage though.
The su
Hello,
I'm using the combination happstack + digestive-functors + web-routes +
blazeHTML.
I'm not finding any examples on the net...
I've tried to adapt your example (thanks):
type NomicForm a = HappstackForm IO String BlazeFormHtml a
demoForm :: NomicForm (Text, Text)
demoForm =
(,) <$> ((
Hello,
after installing digestive-functors-blaze with:
cabal install digestive-functors-blaze
My prog doesn't compiles anymore:
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
Followed by an error on MonadCatchIO.
Hello,
newRule also needs to have the type, RoutedNomicServer. The
transformation of RoutedNomicServer into NomicServer is done in the
handleSite function. Something like this:
nomicSpec :: ServerHandle -> Site Route (ServerPartT IO Response)
nomicSpec sh =
Site { handleSite = \f
Hello,
I have difficulties mixing web-routes and forms:
I have put routes in all my site, except for forms which remains with the
type ServerPartT IO Response.
How to make them work together?
I have:
type NomicServer = ServerPartT IO
type RoutedNomicServer = RouteT PlayerCommand Nomic
12 matches
Mail list logo