[web-devel] Evaluating Yesod and some issues with yesod-tableview.

Anakreon Mentis anakreonmejdi at gmail.com
Tue Jul 19 17:49:12 CEST 2011

For a week, in my free time, I want to evaluate Yesod.

My plan is to rebuild in Yesod an application I have created with PHP.
The application requires user authentication, access privileges for
each user, forms and views for the data.
Some forms should have repeated elements such as
Name1     Surname1 Age1
Name2     Surname2 Age2
Namen     Surnamen Agen

My understanding is that Yesod can not handle this use case yet. If
this is true I intend to include a hidden filed which will contain the
values of the repeated elements in json format.
Also, the respective form elements will have no name to prevent the
browser from submitting their value.

Before that, I need to to have a table which will list entries from a
db table. The table should support pagination and filters. The filters
will be in a form like:
Name            [An*          ]
Age between  [12   ]    [100]

The values displayed in the table should be limited based on the
values provided in the filters fields.

I found a project in hackage, yesod-tableview.
It doesn't compile. The error message I get is
    Couldn't match expected type `text-'
           against inferred type `[Char]'
      Expected type: [(Int, text-]
      Inferred type: [(Int, String)]
    In the first argument of `selectField', namely `numbers'
    In the expression: selectField numbers (fromString prompt) mdata

I fixed the problem by removing the form which I don't needed anyway.
I intend to do more modifications on the package. Namely, I'd like to
make the package configurable on it's templates in order to produce
json instead of html.
This would permit integrating the functionality provided by the
package with javascript grid components such as

In order to develop the project I will have to deal with
authentication, authorization, forms, persistent and widgets. I hope I
will not wear your patience with my questions.
Freely accessible examples that achieve parts of the intended
functionality of the test application, would be very useful.

Regards, Anakreontas Mentis

More information about the web-devel mailing list