You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com> on 2002/09/05 16:37:26 UTC

The dbAdd action not working

Please help me:

I am using Cocoon 2.1:

In the sitemap I have:

<map:action-set name="process">
	<map:act action="Crear Categoria" type="form-validator">
 	       <map:parameter name="validate-set" value="add"/>
  	      <map:act type="dbAdd"/>
   	</map:act>
<map:action-set>

The actions are declared:

<map:action logger="sitemap.action.dbAdd"
	name="dbAdd"
<map:action logger="sitemap.action.form-validator"
	name="form-validator"
	src="org.apache.cocoon.acting.FormValidatorAction"/>

The match in the pipeline is:

      <map:match pattern="cat-*.html">
        <map:act type="auth-protect">
		    <map:parameter name="handler" value="agshandler"/>

            <map:match pattern="cat-*.html">
                <map:act set="process">
                    <map:parameter name="descriptor"
			value="docs/cat-form.xml"/>
                    <!-- if success -->
                    <map:generate src="docs/cat-confirm.xsp"
			type="serverpages"/>
                    <map:transform src="stylesheets/agssa.xsl"/>
                    <map:serialize/>
                </map:act> <!-- if fail -->
                <map:generate src="docs/cat-{1}.xsp" type="serverpages"/>
                <map:transform src="stylesheets/agssa.xsl"/>
                <map:serialize/>
            </map:match>
        </map:act>
        <map:transform src="stylesheets/agssa.xsl"/>
        <map:serialize/>
      </map:match>

The form-validator is working well, but the data are not going to the 
database. I saw in the logs and there was not any logger activity to dbAdd.

What I am doing wrong?

Antonio Gallardo

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: The dbAdd action not working

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Please, can somebody explain more about this solution? :)

I was trying to find info about "resources" but I was not found nothing.

Antonio Gallardo

El Viernes, 06 de Septiembre de 2002 00:37, Christian Haul escribió:
> On 05.Sep.2002 -- 09:20 PM, Antonio Gallardo Rivera wrote:
> > What we can do with this problem? :(
> >
> > I need to end forms to the next thursday :(
> >
> > How I can help?
> >
> > Antonio Gallardo.
>
> Since this is not advocated officially, I respond off-list. 2.1 resources
> have a feature / bug, so they will *return* to the calling statement
> if no serializer is found.
>
> With this you can use resources very similar to action-sets, although
> you need to code the selector yourself.
>
> Opinions differ whether this is a feature that will stay or a bug that
> will be squashed, Since This discussion was end of spring, I hope it
> will stay :-)
>
> If it doesn't you'll have an easy migration back to working action-sets
> by changing a few tag names and removing the selector.
>
> 	Chris.

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: The dbAdd action not working

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 05.Sep.2002 -- 09:20 PM, Antonio Gallardo Rivera wrote:
> What we can do with this problem? :(
> 
> I need to end forms to the next thursday :(
> 
> How I can help?
> 
> Antonio Gallardo.
> 
Since this is not advocated officially, I respond off-list. 2.1 resources
have a feature / bug, so they will *return* to the calling statement
if no serializer is found.

With this you can use resources very similar to action-sets, although
you need to code the selector yourself.

Opinions differ whether this is a feature that will stay or a bug that
will be squashed, Since This discussion was end of spring, I hope it 
will stay :-)

If it doesn't you'll have an easy migration back to working action-sets
by changing a few tag names and removing the selector.
	
	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: The dbAdd action not working

Posted by Franck Lumpe <fr...@iberplus.com>.
If you are in a hurry and solution will take time.

A) Do your coding another way
B) Switch back to 2.0.3. until problem is solved (yeah I know sounds stupid,
but maybe it is possible in your environment)

Solution A) is probably better :-)

Not a Cocoon answer, just general IT problem solving. Maybe it helps anyway.

Regards,

Franck Lumpe
Iberplus Internet, s.l.
www.iberplus.es

----- Original Message -----
From: "Antonio Gallardo Rivera" <ag...@agsoftware.dnsalias.com>
To: <co...@xml.apache.org>
Sent: Friday, September 06, 2002 5:20 AM
Subject: Re: The dbAdd action not working


What we can do with this problem? :(

I need to end forms to the next thursday :(

How I can help?

Antonio Gallardo.

El Jueves, 05 de Septiembre de 2002 09:11, Antonio Gallardo Rivera escribió:
> Gerhard:
>
> Many thanks, I put to it 3 points in the bugzilla ;)
>
> I hope it will be soon resolved.
>
> Regards
>
> Antonio Gallardo
>
> El Jueves, 05 de Septiembre de 2002 08:46, Gerhard Hipfinger escribió:
> > Hi Antonio,
> >
> > This bug was reported from Ivan Luzyanin quite a long time ago. There is
> > a bug report under
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835
> >
> > Please, confirm this bug, I hope someone will investigate this issue.
> > This bug is the reason I can't switch to 2.1 (and still use 2.0.3).
> >
> > Regards,
> > Gerhard
> >
> > Antonio Gallardo Rivera wrote:
> > > Please help me:
> > >
> > > I am using Cocoon 2.1:
> > >
> > > In the sitemap I have:
> > >
> > > <map:action-set name="process">
> > > <map:act action="Crear Categoria" type="form-validator">
> > >         <map:parameter name="validate-set" value="add"/>
> > >         <map:act type="dbAdd"/>
> > >    </map:act>
> > > <map:action-set>
> > >
> > > The actions are declared:
> > >
> > > <map:action logger="sitemap.action.dbAdd"
> > > name="dbAdd"
> > > <map:action logger="sitemap.action.form-validator"
> > > name="form-validator"
> > > src="org.apache.cocoon.acting.FormValidatorAction"/>
> > >
> > > The match in the pipeline is:
> > >
> > >       <map:match pattern="cat-*.html">
> > >         <map:act type="auth-protect">
> > >     <map:parameter name="handler" value="agshandler"/>
> > >
> > >             <map:match pattern="cat-*.html">
> > >                 <map:act set="process">
> > >                     <map:parameter name="descriptor"
> > > value="docs/cat-form.xml"/>
> > >                     <!-- if success -->
> > >                     <map:generate src="docs/cat-confirm.xsp"
> > > type="serverpages"/>
> > >                     <map:transform src="stylesheets/agssa.xsl"/>
> > >                     <map:serialize/>
> > >                 </map:act> <!-- if fail -->
> > >                 <map:generate src="docs/cat-{1}.xsp"
> > > type="serverpages"/> <map:transform src="stylesheets/agssa.xsl"/>
> > >                 <map:serialize/>
> > >             </map:match>
> > >         </map:act>
> > >         <map:transform src="stylesheets/agssa.xsl"/>
> > >         <map:serialize/>
> > >       </map:match>
> > >
> > > The form-validator is working well, but the data are not going to the
> > > database. I saw in the logs and there was not any logger activity to
> > > dbAdd.
> > >
> > > What I am doing wrong?
> > >
> > > Antonio Gallardo
> > >
> > > ---------------------------------------------------------------------
> > > 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:     <co...@xml.apache.org>
> > > For additional commands, e-mail:   <co...@xml.apache.org>
> >
> > ---------------------------------------------------------------------
> > 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:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>




---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: The dbAdd action not working

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
What we can do with this problem? :(

I need to end forms to the next thursday :(

How I can help?

Antonio Gallardo.

El Jueves, 05 de Septiembre de 2002 09:11, Antonio Gallardo Rivera escribió:
> Gerhard:
>
> Many thanks, I put to it 3 points in the bugzilla ;)
>
> I hope it will be soon resolved.
>
> Regards
>
> Antonio Gallardo
>
> El Jueves, 05 de Septiembre de 2002 08:46, Gerhard Hipfinger escribió:
> > Hi Antonio,
> >
> > This bug was reported from Ivan Luzyanin quite a long time ago. There is
> > a bug report under
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835
> >
> > Please, confirm this bug, I hope someone will investigate this issue.
> > This bug is the reason I can't switch to 2.1 (and still use 2.0.3).
> >
> > Regards,
> > Gerhard
> >
> > Antonio Gallardo Rivera wrote:
> > > Please help me:
> > >
> > > I am using Cocoon 2.1:
> > >
> > > In the sitemap I have:
> > >
> > > <map:action-set name="process">
> > > 	<map:act action="Crear Categoria" type="form-validator">
> > >  	       <map:parameter name="validate-set" value="add"/>
> > >   	      <map:act type="dbAdd"/>
> > >    	</map:act>
> > > <map:action-set>
> > >
> > > The actions are declared:
> > >
> > > <map:action logger="sitemap.action.dbAdd"
> > > 	name="dbAdd"
> > > <map:action logger="sitemap.action.form-validator"
> > > 	name="form-validator"
> > > 	src="org.apache.cocoon.acting.FormValidatorAction"/>
> > >
> > > The match in the pipeline is:
> > >
> > >       <map:match pattern="cat-*.html">
> > >         <map:act type="auth-protect">
> > > 		    <map:parameter name="handler" value="agshandler"/>
> > >
> > >             <map:match pattern="cat-*.html">
> > >                 <map:act set="process">
> > >                     <map:parameter name="descriptor"
> > > 			value="docs/cat-form.xml"/>
> > >                     <!-- if success -->
> > >                     <map:generate src="docs/cat-confirm.xsp"
> > > 			type="serverpages"/>
> > >                     <map:transform src="stylesheets/agssa.xsl"/>
> > >                     <map:serialize/>
> > >                 </map:act> <!-- if fail -->
> > >                 <map:generate src="docs/cat-{1}.xsp"
> > > type="serverpages"/> <map:transform src="stylesheets/agssa.xsl"/>
> > >                 <map:serialize/>
> > >             </map:match>
> > >         </map:act>
> > >         <map:transform src="stylesheets/agssa.xsl"/>
> > >         <map:serialize/>
> > >       </map:match>
> > >
> > > The form-validator is working well, but the data are not going to the
> > > database. I saw in the logs and there was not any logger activity to
> > > dbAdd.
> > >
> > > What I am doing wrong?
> > >
> > > Antonio Gallardo
> > >
> > > ---------------------------------------------------------------------
> > > 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:     <co...@xml.apache.org>
> > > For additional commands, e-mail:   <co...@xml.apache.org>
> >
> > ---------------------------------------------------------------------
> > 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:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: The dbAdd action not working

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Gerhard:

You are right!

This simple action is working fine:

<map:act action="Borrar" type="dbDel"/>

but:

<map:act action="Crear Categoria" type="form-validator">
        <map:parameter name="validate-set" value="add"/>
        <map:act type="dbAdd"/>
      </map:act>
<map:act action="Actualizar" type="form-validator">
        <map:parameter name="validate-set" value="update"/>
        <map:act type="dbUpd"/>
</map:act>

does not work. :(

How to make a workaround about that? maybe trough a <map:redirect-to> or 
something like that?

Antonio Gallardo.


El Jueves, 05 de Septiembre de 2002 09:11, Antonio Gallardo Rivera escribió:
> Gerhard:
>
> Many thanks, I put to it 3 points in the bugzilla ;)
>
> I hope it will be soon resolved.
>
> Regards
>
> Antonio Gallardo
>
> El Jueves, 05 de Septiembre de 2002 08:46, Gerhard Hipfinger escribió:
> > Hi Antonio,
> >
> > This bug was reported from Ivan Luzyanin quite a long time ago. There is
> > a bug report under
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835
> >
> > Please, confirm this bug, I hope someone will investigate this issue.
> > This bug is the reason I can't switch to 2.1 (and still use 2.0.3).
> >
> > Regards,
> > Gerhard
> >
> > Antonio Gallardo Rivera wrote:
> > > Please help me:
> > >
> > > I am using Cocoon 2.1:
> > >
> > > In the sitemap I have:
> > >
> > > <map:action-set name="process">
> > > 	<map:act action="Crear Categoria" type="form-validator">
> > >  	       <map:parameter name="validate-set" value="add"/>
> > >   	      <map:act type="dbAdd"/>
> > >    	</map:act>
> > > <map:action-set>
> > >
> > > The actions are declared:
> > >
> > > <map:action logger="sitemap.action.dbAdd"
> > > 	name="dbAdd"
> > > <map:action logger="sitemap.action.form-validator"
> > > 	name="form-validator"
> > > 	src="org.apache.cocoon.acting.FormValidatorAction"/>
> > >
> > > The match in the pipeline is:
> > >
> > >       <map:match pattern="cat-*.html">
> > >         <map:act type="auth-protect">
> > > 		    <map:parameter name="handler" value="agshandler"/>
> > >
> > >             <map:match pattern="cat-*.html">
> > >                 <map:act set="process">
> > >                     <map:parameter name="descriptor"
> > > 			value="docs/cat-form.xml"/>
> > >                     <!-- if success -->
> > >                     <map:generate src="docs/cat-confirm.xsp"
> > > 			type="serverpages"/>
> > >                     <map:transform src="stylesheets/agssa.xsl"/>
> > >                     <map:serialize/>
> > >                 </map:act> <!-- if fail -->
> > >                 <map:generate src="docs/cat-{1}.xsp"
> > > type="serverpages"/> <map:transform src="stylesheets/agssa.xsl"/>
> > >                 <map:serialize/>
> > >             </map:match>
> > >         </map:act>
> > >         <map:transform src="stylesheets/agssa.xsl"/>
> > >         <map:serialize/>
> > >       </map:match>
> > >
> > > The form-validator is working well, but the data are not going to the
> > > database. I saw in the logs and there was not any logger activity to
> > > dbAdd.
> > >
> > > What I am doing wrong?
> > >
> > > Antonio Gallardo
> > >
> > > ---------------------------------------------------------------------
> > > 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:     <co...@xml.apache.org>
> > > For additional commands, e-mail:   <co...@xml.apache.org>
> >
> > ---------------------------------------------------------------------
> > 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:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: The dbAdd action not working

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Gerhard:

Many thanks, I put to it 3 points in the bugzilla ;)

I hope it will be soon resolved.

Regards

Antonio Gallardo

El Jueves, 05 de Septiembre de 2002 08:46, Gerhard Hipfinger escribió:
> Hi Antonio,
>
> This bug was reported from Ivan Luzyanin quite a long time ago. There is
> a bug report under
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835
>
> Please, confirm this bug, I hope someone will investigate this issue.
> This bug is the reason I can't switch to 2.1 (and still use 2.0.3).
>
> Regards,
> Gerhard
>
> Antonio Gallardo Rivera wrote:
> > Please help me:
> >
> > I am using Cocoon 2.1:
> >
> > In the sitemap I have:
> >
> > <map:action-set name="process">
> > 	<map:act action="Crear Categoria" type="form-validator">
> >  	       <map:parameter name="validate-set" value="add"/>
> >   	      <map:act type="dbAdd"/>
> >    	</map:act>
> > <map:action-set>
> >
> > The actions are declared:
> >
> > <map:action logger="sitemap.action.dbAdd"
> > 	name="dbAdd"
> > <map:action logger="sitemap.action.form-validator"
> > 	name="form-validator"
> > 	src="org.apache.cocoon.acting.FormValidatorAction"/>
> >
> > The match in the pipeline is:
> >
> >       <map:match pattern="cat-*.html">
> >         <map:act type="auth-protect">
> > 		    <map:parameter name="handler" value="agshandler"/>
> >
> >             <map:match pattern="cat-*.html">
> >                 <map:act set="process">
> >                     <map:parameter name="descriptor"
> > 			value="docs/cat-form.xml"/>
> >                     <!-- if success -->
> >                     <map:generate src="docs/cat-confirm.xsp"
> > 			type="serverpages"/>
> >                     <map:transform src="stylesheets/agssa.xsl"/>
> >                     <map:serialize/>
> >                 </map:act> <!-- if fail -->
> >                 <map:generate src="docs/cat-{1}.xsp" type="serverpages"/>
> >                 <map:transform src="stylesheets/agssa.xsl"/>
> >                 <map:serialize/>
> >             </map:match>
> >         </map:act>
> >         <map:transform src="stylesheets/agssa.xsl"/>
> >         <map:serialize/>
> >       </map:match>
> >
> > The form-validator is working well, but the data are not going to the
> > database. I saw in the logs and there was not any logger activity to
> > dbAdd.
> >
> > What I am doing wrong?
> >
> > Antonio Gallardo
> >
> > ---------------------------------------------------------------------
> > 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:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
>
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: The dbAdd action not working

Posted by Gerhard Hipfinger <ge...@openforce.at>.
Hi Antonio,

This bug was reported from Ivan Luzyanin quite a long time ago. There is 
a bug report under

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9835

Please, confirm this bug, I hope someone will investigate this issue. 
This bug is the reason I can't switch to 2.1 (and still use 2.0.3).

Regards,
Gerhard

Antonio Gallardo Rivera wrote:
> Please help me:
> 
> I am using Cocoon 2.1:
> 
> In the sitemap I have:
> 
> <map:action-set name="process">
> 	<map:act action="Crear Categoria" type="form-validator">
>  	       <map:parameter name="validate-set" value="add"/>
>   	      <map:act type="dbAdd"/>
>    	</map:act>
> <map:action-set>
> 
> The actions are declared:
> 
> <map:action logger="sitemap.action.dbAdd"
> 	name="dbAdd"
> <map:action logger="sitemap.action.form-validator"
> 	name="form-validator"
> 	src="org.apache.cocoon.acting.FormValidatorAction"/>
> 
> The match in the pipeline is:
> 
>       <map:match pattern="cat-*.html">
>         <map:act type="auth-protect">
> 		    <map:parameter name="handler" value="agshandler"/>
> 
>             <map:match pattern="cat-*.html">
>                 <map:act set="process">
>                     <map:parameter name="descriptor"
> 			value="docs/cat-form.xml"/>
>                     <!-- if success -->
>                     <map:generate src="docs/cat-confirm.xsp"
> 			type="serverpages"/>
>                     <map:transform src="stylesheets/agssa.xsl"/>
>                     <map:serialize/>
>                 </map:act> <!-- if fail -->
>                 <map:generate src="docs/cat-{1}.xsp" type="serverpages"/>
>                 <map:transform src="stylesheets/agssa.xsl"/>
>                 <map:serialize/>
>             </map:match>
>         </map:act>
>         <map:transform src="stylesheets/agssa.xsl"/>
>         <map:serialize/>
>       </map:match>
> 
> The form-validator is working well, but the data are not going to the 
> database. I saw in the logs and there was not any logger activity to dbAdd.
> 
> What I am doing wrong?
> 
> Antonio Gallardo
> 
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 
> 



---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: The dbAdd action not working

Posted by Klaus Bertram <be...@n-bis.de>.
Hi Antonio,

You must also set the for-descriptor for form validation

<map:parameter name="form-descriptor" value="docs/cat-form.xml"/>

The descriptor is only for the action dbAdd

Klaus

> -----Original Message-----
> From: Antonio Gallardo Rivera [mailto:agallardo@agsoftware.dnsalias.com]
> Sent: Thursday, September 05, 2002 4:37 PM
> To: cocoon-users@xml.apache.org
> Subject: The dbAdd action not working
> 
> 
> Please help me:
> 
> I am using Cocoon 2.1:
> 
> In the sitemap I have:
> 
> <map:action-set name="process">
> 	<map:act action="Crear Categoria" type="form-validator">
>  	       <map:parameter name="validate-set" value="add"/>
>   	      <map:act type="dbAdd"/>
>    	</map:act>
> <map:action-set>
> 
> The actions are declared:
> 
> <map:action logger="sitemap.action.dbAdd"
> 	name="dbAdd"
> <map:action logger="sitemap.action.form-validator"
> 	name="form-validator"
> 	src="org.apache.cocoon.acting.FormValidatorAction"/>
> 
> The match in the pipeline is:
> 
>       <map:match pattern="cat-*.html">
>         <map:act type="auth-protect">
> 		    <map:parameter name="handler" value="agshandler"/>
> 
>             <map:match pattern="cat-*.html">
>                 <map:act set="process">
>                     <map:parameter name="descriptor"
> 			value="docs/cat-form.xml"/>

<map:parameter name="form-descriptor" value="docs/cat-form.xml"/>

>                     <!-- if success -->
>                     <map:generate src="docs/cat-confirm.xsp"
> 			type="serverpages"/>
>                     <map:transform src="stylesheets/agssa.xsl"/>
>                     <map:serialize/>
>                 </map:act> <!-- if fail -->
>                 <map:generate src="docs/cat-{1}.xsp" type="serverpages"/>
>                 <map:transform src="stylesheets/agssa.xsl"/>
>                 <map:serialize/>
>             </map:match>
>         </map:act>
>         <map:transform src="stylesheets/agssa.xsl"/>
>         <map:serialize/>
>       </map:match>
> 
> The form-validator is working well, but the data are not going to the 
> database. I saw in the logs and there was not any logger activity 
> to dbAdd.
> 
> What I am doing wrong?
> 
> Antonio Gallardo
> 
> ---------------------------------------------------------------------
> 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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
> 
> 

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>