You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Donald Ball <ba...@webslingerZ.com> on 2001/03/08 22:19:33 UTC
database actions
heya. just testing berin's database actions out - good stuff! 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?
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?
what's the benefit of grouping the actions together into an action set?
- donald
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: database actions
Posted by Berin Loritsch <bl...@apache.org>.
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