Forum OpenACS Development: Response to acs_atributes usage ?

Collapse
Posted by Barry Books on
By #1 I mean all the object types in the base system should have their attributes set correctly. I don't think this is the case but I don't have any specific examples either. At any rate it's a fairly simple matter to fix them.

The rapid protyotype package (#2) I picked up off the arsDigita site. It works ok but the code it generates requires some hand editing to work. Again not a big deal it just needs some work.

By #3 I mean you need to be able to create an object that consists of other objects. For example a contact could be a person, address and phone number. So in the system I'm working on you create an object called Contact and give it 3 attributes Person, Address and Phone Number. The datatypes are person, address and phone_number. You might set max_n_values like person 1, address 3 phone 5. That way one person can have 3 address and 5 phone numbers.

I've integrated this into the templating system by creating a function that can display an input form for any object type. It's formating is simple so an addres might look like

line 1 _____
line 2 _____
City _____
State _____
ZIP _____
To get around this you can create a function called template::widget::address. If that function exists the form system uses it instead of the default. It might return something like
Line 1 ______
Line 2 ______
City _____, State __ ZIP _____
The is also a default validate. Currently if you supply a widget function you must also supply a validate.

Finally there is a function that can take an ns_set of objects and puts them in the database based on the information in the attribute table. It can handle insert and update but currently not delete.

This is all based on the forms part of the templating package which appears to have a lot of functionality but it not well documented.

As for #5 I marked it optional because it's not needed for everyone. In my case it's just as likely the site is accessed by another program and currently the interface of choice appears to be XML.

As far as getting into the base system with the exception of the XML part there is very little code, however for it to be truly useful many base objects might need custom "widgets". The XML part might be more difficult. It's written in PL/SQL and very oracle dependent.