Here is my snipet of my sitemap that do this without action-sets. Maybe this 
is not the best solution, but it works :). Also I know this is only a work 
around until the error will be fixed.

I send the request in the form: cat-crear.html

cat = category (a database table or form)
crear = the database action.

**************************
<!-- catálogos -->
            <map:match pattern="*-*.html">

                <!-- Crear -->
                <map:match type="request-parameter" 
pattern="cocoon-action-Crear">
                    <map:act action="crear" type="form-validator">
                        <map:parameter name="descriptor" 
value="docs/{../1}-form.xml"/>
                        <map:parameter name="validate-set" value="add"/>
                        <map:act type="dbAdd">
                            <map:parameter name="descriptor" 
value="docs/{../../1}-form.xml"/>
                            <map:parameter name="validate-set" value="add"/>
                            <map:generate src="docs/{../../../1}-confirm.xsp" 
type="serverpages"/>
                            <map:transform src="stylesheets/agssa.xsl"/>
                            <map:serialize/>
                        </map:act>
                    </map:act>
                </map:match>

                <!-- Actualizar -->
                <map:match type="request-parameter" 
pattern="cocoon-action-Guardar">
                    <map:act action="actualizar" type="form-validator">
                        <map:parameter name="descriptor" 
value="docs/{../1}-form.xml"/>
                        <map:parameter name="validate-set" value="update"/>
                        <map:act type="dbUpd">
                            <map:parameter name="descriptor" 
value="docs/{../../1}-form.xml"/>
                            <map:parameter name="validate-set" value="add"/>
                            <map:generate src="docs/{../../../1}-confirm.xsp" 
type="serverpages"/>
                            <map:transform src="stylesheets/agssa.xsl"/>
                            <map:serialize/>
                        </map:act>
                    </map:act>
                </map:match>

                <!-- Borrar -->
                <map:match type="request-parameter" 
pattern="cocoon-action-Borrar">
                    <map:act action="borrar" type="dbDel">
                        <map:parameter name="descriptor" 
value="docs/{../1}-form.xml"/>
                        <map:generate src="docs/{../../1}-confirm.xsp" 
type="serverpages"/>
                        <map:transform src="stylesheets/agssa.xsl"/>
                        <map:serialize/>
                    </map:act>
                    <map:generate src="docs/{1}-{2}.xsp" type="serverpages"/>
                    <map:transform src="stylesheets/agssa.xsl"/>
                    <map:serialize/>
                </map:match>

                <!-- Todo lo demás -->
               <map:match pattern="*-*.html">
                    <map:generate src="docs/{1}-{2}.xsp" type="serverpages"/>
                    <map:transform src="stylesheets/agssa.xsl"/>
                    <map:serialize/>
                </map:match>

****************************

I hope it can help you.

regards,

Antonio Gallardo


El Martes, 17 de Septiembre de 2002 09:19, William Moore escribió:
> Hello
>
> I am trying to use FormValidatorAction to check data before inserting it
> into a database.
>
> The key on the database is one of the values on the form, and I want to
> check if it already exists on the database so I can tell the user to enter
> a different value.
>
> I cannot work out how to do this. The documentation suggests I should be
> doing something with a DatabaseAction, but I do not know what.
>
> Please can someone offer advice on how to do this.
>
> Thanks
>
> William
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to