Forum OpenACS Development: Re: ad_form for new and edit requests

Collapse
Posted by Don Baccus on
The one place I *do* like the display capability being enabled on forms is where one wants to disable editing of a particular field while enabling editing of others, as is done in the bug tracker.

Joel, one of the goals that Jun, Dave and I have is to expose the template/cr/cms triad's functionality in a well-designed Tcl API using Jun's stuff as a base.  We should be able to apply a bunch of the template/attribute work to base objects, too.

Auto-generated forms as well as auto-generated display templates are possible using the attribute metadata.  The display code just walks through the attributes and asks the widgets to display them, much as is being done in ad_form's display mode.  Much of this is buried in the CMS package and needs to be exposed ... and Jun's done some work in this area in the BCMS code as well.

Custom forms and display templates will still be with us, though.  That doesn't mean they aren't different and doesn't mean both should be handled by ad_form, though.

To some extent all of this falls apart a bit in the presence of LOBs/CLOBs which need custom handling compared to normal fields and of course differ with each RDBMS.

Anyway, I'm busy at the University of Galileo until the 24th and won't be able to put much time into the whole CR/template/object/metadata/etc problem until then, but intend to work on that and to complete my portals package stuff in March.  Meanwhile Dave and Jun are working on the CR Tcl API stuff as we speak ...