I resolve the problem: A stupid problem! I alone made it! I miss it:
<values> <validate dbcol="can_beneficiario" param="beneficiario" ^^^^^^^^^ Here is not validatre is value! <values> <value dbcol="can_beneficiario" param="beneficiario" Thanks to all ;) Antonio Gallardo El Miércoles, 09 de Octubre de 2002 14:06, Antonio Gallardo Rivera escribió: > Hi: > > I am using dbAdd from the Original Database Actions. All my forms work very > well and I can add, update and remove records in a PostgreSQL. database. > > But, I have a form that can add a register and it seems like after some > javascript change values in the form (based on what the user select on a > <select> tag). The dbAdd is not able to work with the parameters. I needed > to rename some of the params to meet the right name of the field into the > database. > For example: I before had a param called "id" and: > > <key dbcol="can_id" mode="form" param="id" type="long"/> > > But if I do that, then I got a error that the can_id can not be null (its > natural, but not normal), because I have into the form fixed the value for > "id": > > <parameter name="id" value="1"/> > > Then there is no way how "id" can be null! > > Please help, me. > > I am using Tomcat 4.1.12, Java 1.4.1, Cocoon -dev 2.1. > > Antonio Gallardo > > My descriptor.xml: **************************************************** > <root> > <parameter name="id" nullable="no" min="1" type="long"/> > <parameter name="cli_id" nullable="no" min="1" type="long"/> > <parameter name="can_estado" nullable="no" min="1" max="3" type="long"/> > <parameter name="usr_id" nullable="no" min="1" type="long"/> > <parameter name="beneficiario" nullable="no" min-len="3" max-len="50" > type="string"/> > <parameter name="metodo_entrega" nullable="no" min="1" max="3" > type="long"/> <parameter name="direccion" nullable="no" min-len="5" > max-len="200" type="string"/> > <parameter name="soc_id" nullable="no" min="1" type="long"/> > <parameter name="pre_id" nullable="no" min="1" type="long"/> > <parameter name="pre_nombre" nullable="no" min-len="3" max-len="50" > type="string"/> > <constraint-set name="update"> > <validate name="id"/> > <validate name="cli_id"/> > <validate name="usr_id"/> > <validate name="can_estado"/> > <validate name="beneficiario"/> > <validate name="metodo_entrega"/> > <validate name="direccion"/> > <validate name="soc_id"/> > <validate name="pre_id"/> > <validate name="pre_nombre"/> > </constraint-set> > <constraint-set name="add"> > <validate name="cli_id"/> > <validate name="usr_id"/> > <validate name="can_estado"/> > <validate name="beneficiario"/> > <validate name="metodo_entrega"/> > <validate name="direccion"/> > <validate name="soc_id"/> > <validate name="pre_id"/> > <validate name="pre_nombre"/> > </constraint-set> > <connection>mp_pool</connection> > <table name="canje"> > <keys> > <key dbcol="can_id" mode="form" param="id" type="long"/> > <key dbcol="cli_id" mode="form" param="cli_id" type="long"/> > <key dbcol="usr_id" mode="form" param="usr_id" type="long"/> > <key dbcol="can_estado" mode="form" param="estado" type="long"/> > </keys> > <values> > <validate dbcol="can_beneficiario" param="beneficiario" > type="string"/> <validate dbcol="can_metodo_entrega" param="metodo_entrega" > type="long"/> > <validate dbcol="can_direccion_entrega" param="direccion" > type="string"/> > <validate dbcol="soc_id" param="soc_id" type="long"/> > <validate dbcol="pre_id"param="pre_id" type="long"/> > <validate dbcol="pre_nombre" param="pre_nombre" type="string"/> > <validate dbcol="pre_usd" param="dolares" type="string"/> > <validate dbcol="pre_millas" param="millas" type="long"/> > </values> > </table> > </root> > *********************************************************** > > --------------------------------------------------------------------- > 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]>