[Zope] Problem with dtml-if sequence-start
Borja Prieto
borja.prieto@alanta.info
Mon, 4 Aug 2003 01:14:58 +0200
Thank you for your help, but...
I have simplified my code, replaced dtml-return for dtml-call... and it
still doesn´t work.
Here is my code now:
<dtml-unless txtCertificado>
<dtml-call "RESPONSE.redirect(URL1+'/InicioIC'+'?msg_error=Error: debe
introducir un número de certificado')">
</dtml-unless>
<dtml-in BuscaCertificado>
<dtml-if sequence-start>
<dtml-call "RESPONSE.redirect(URL1+'/InicioIC'+'?msg_error=Error:
el certificado '+txtCertificado+' ya existe')">
</dtml-if sequence-start>
<dtml-call
"RESPONSE.redirect(URL1+'/IC'+'?txtCertificado='+txtCertificado)">
</dtml-in>
So I first check if the user has entered a value for txtCertificado, and
return with an error message if it is not the case. The program does it
right.
Then I check for txtCertificado in the database (with th ZSQL method
BuscaCertificado) and if it is found, it returns with an error message. The
program also does it right.
But when it finds the third case (there is a value for txtCertificado, and
it is not already in the database) it does nothing. Instead of going to
URL1+'/IC', it just shows a blank page. I really can't understand what could
be the problem, because the logic seems so simple. Just in case that it
matters, I am using Zope 2.6.1 on Windows.
Borja Prieto
Alanta
> -----Mensaje original-----
> De: zope-admin@zope.org [mailto:zope-admin@zope.org]En nombre de Dylan
> Reinhardt
> Enviado el: viernes, 01 de agosto de 2003 22:46
> Para: Tino Wildenhain
> CC: Borja Prieto; zope@zope.org
> Asunto: Re: [Zope] Problem with dtml-if sequence-start
>
>
> On Fri, 2003-08-01 at 12:16, Tino Wildenhain wrote:
> > Dylan Reinhardt wrote:
> > > On Fri, 2003-08-01 at 08:47, Dylan Reinhardt wrote:
> > > There are precious few cases where dtml-return is correct...
> so few, in
> > > fact, you could use Zope for a couple years straight and easily forget
> > > it exists. :-)
> >
> > Hehe. You can also use Zope and easyly forget that DTML exists ;)
> > At least for templates and logic.
>
> Guess I walked into that one... :-)
>
>
> Dylan
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>