On Thu, 2002-12-05 at 13:51, Aaron Held wrote:
> Has anyone tried to create fully dynamic form definitions using FFK?
> 
> I am thinking of an app that would dynamically generate an HTML 
> interface to a given table.
> 
> Assuming that the table metadata and business rules do not change it 
> should be relatively easy to create a form using the mutable 
> formdefinition and validators.
> 
> So if you want to track birthdays the SQL table could have a date, name 
> and age field.
> The FFK would pick out a date and two text fields, One of the text would 
> have a validator to specify an integer >= 0.

I think that would be very interesting to do something with database
form generation.  I think the best way, however, would be to subclass
FormDefinition.  I'd imagine using it (in your servlet):

formDef = DBForm(connectionInfo={'user': ...}, table='users')

And then DBForm would fetch the table description and figure out what a
form for that should look like.  You could do something more
sophisticated by hooking it into some DB wrapper instead of directly
into the database.

Part of why FFK uses Python objects for the form definition, instead of
some other format (XML, CSV, etc), was to make this sort of wrapping
easier.



-- 
Ian Bicking           Colorstudy Web Development
[EMAIL PROTECTED]   http://www.colorstudy.com
PGP: gpg --keyserver pgp.mit.edu --recv-keys 0x9B9E28B7
4869 N Talman Ave, Chicago, IL 60625 / (773) 275-7241



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to