Forum OpenACS Development: Response to Form generator for OpenACS4 / PostgreSQL

Posted by Luke Pond on
Thanks Don. The generated code works great for plain old database tables that are not ACS objects. That's what I'm working with at the moment, and that's what the insert and update statements are intended for. I don't think this tool will encourage people to ignore the PL/SQL API; they'd have to go out of their way to do that. If used against a typical OpenACS table, the default DML code will fail when trying to insert the table's primary key, since no corresponding row exists in acs_objects.

A different version of this tool could be produced that was more directly helpful in the effort to revamp the OpenACS UI. But it couldn't help you very much with the difficult task of figuring out the positional parameters in each API call, since as you say, the API for every object type is slightly different.

I followed the example of all the packages I could find that use ATS forms (like photo-album) and didn't attempt to do any validation of user input with ad_page_contract. That gets done by the template::element calls. I'm pretty happy with the way that validation errors get reported inline with the form.