cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: database actions
Date Thu, 08 Mar 2001 21:52:12 GMT
Donald Ball wrote:
> 
> heya. just testing berin's database actions out - good stuff!

Thanks.

> let me make
> sure i'm following the flow control properly - when a request for
> /forms/employee received, c2 checks to see if there's a request parameter
> named cocoon-action. if so, it fires off the proper action. in any case,
> it'll render the edit employee(s) form. correct so far?

Yep.

> the database manipulation actions rely on a form-descriptor parameter
> which gives some meta-information about the table(s) in question, e.g.:
> 
> <?xml version="1.0"?>
> 
> <employee>
>   <connection>personnel</connection>
>   <table name="employee_table">
>     <keys>
>       <key param="employee" dbcol="id" type="int" mode="manual"/>
>     </keys>
>     <values>
>       <value param="name" dbcol="name" type="string"/>
>       <value param="department" dbcol="department_id" type="int"/>
>     </values>
>   </table>
> </employee>
> 
> yes?

Absolutely.

> what's the benefit of grouping the actions together into an action set?

Here lies the beauty of the Action Set when used in conjunction with the
meta-configuration.

If you had 5 different forms like the Employee.xsp page, each with different
fields, you only need one ActionSet.  Those actions are generic enough so
that with a different parameter, they map the data properly.

Also, it's alot easier to chain actions in this manner.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message