You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Arno Illmann <ar...@ge.stalt.de> on 2001/10/18 21:05:26 UTC
Someone with knowledge in DatabaseXActions?
I am testing around with the tutorial from cvs and with the DatabaseSelectAction.
I added it to the cocoon source and made a new build. After that another test action worked and I
could access the tutorial with the included DatabaseSelectAction without errors.
But i could not get a sample with DatabaseSelectAction working, does someone know a sample of a
working descriptor file and a XSP with a little bit select * from something ...
I i.e. read the DatabaseSelectAction source and all files in the tutorial but I can't find out how
to invoke the action.
Something like following??
<?xml version="1.0"?>
<xsp:page xmlns:xsp="http://apache.org/xsp">
<document>
<header>
<title>Select Test/title>
</header>
<body>
<s1 title="Select Department">
<form handler="select-test.html">
<submit name="Select Department"/>
</form>
</s1>
</body>
</document>
</xsp:page>
And:
Is the DatabaseSelectAction flexible enough for an sql with grouping operators? Example of this too,
please...
Much thanks in advance, Arno
-------------------
Hope this looks ok:
Sitemap:
<map:actions>
<map:action name="dbSel" src="org.apache.cocoon.acting.DatabaseSelectAction"/> <!-- added -->
<map:action name="dbAdd" src="org.apache.cocoon.acting.DatabaseAddAction"/>
<map:action name="dbDel" src="org.apache.cocoon.acting.DatabaseDeleteAction"/>
<map:action name="dbUpd" src="org.apache.cocoon.acting.DatabaseUpdateAction"/>
<map:action name="form" src="org.apache.cocoon.acting.FormValidatorAction"/>
</map:actions>
<map:action-sets>
<map:action-set name="process">
<map:act type="dbSel" action="Select Department"/>
<map:act type="form" action="Create Department">
[ ... and the other ..]
<map:match pattern="select-test.html">
<map:act set="process">
<map:parameter name="descriptor" value="docs/select-form.xml"/>
<map:generate type="serverpages" src="docs/confirm-select.xsp"/>
<map:transform src="stylesheets/apache.xsl"/>
<map:serialize/>
</map:act>
<map:generate type="serverpages" src="docs/select-test.xsp"/>
<map:transform src="stylesheets/apache.xsl"/>
<map:serialize/>
</map:match>
<map:match pattern="select-test.xml">
<map:act set="process">
<map:parameter name="descriptor" value="docs/select-form.xml"/>
<map:generate type="serverpages" src="docs/confirm-select.xsp"/>
<map:serialize type="xml"/>
</map:act>
<map:generate type="serverpages" src="docs/select-test.xsp"/>
<map:serialize type="xml"/>
</map:match>
---- the descriptor file select-form.xml: -----
<root>
<connection>personnel</connection>
<table name="department">
<keys>
<key param="id" dbcol="department_id" type="int" mode="manual"/>
</keys>
<values>
<value param="name" dbcol="department_name" type="string"/>
</values>
</table>
</root>
***********************************************
* And then ? *********************************
***********************************************
Something like following??
<?xml version="1.0"?>
<xsp:page xmlns:xsp="http://apache.org/xsp">
<document>
<header>
<title>Select Test/title>
</header>
<body>
<s1 title="Select Department">
<form handler="select-test.html">
<submit name="Select Department"/>
</form>
</s1>
</body>
</document>
</xsp:page>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>