You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Drasko Kokic <dr...@yahoo.com> on 2000/11/22 11:37:07 UTC

logic in esql:no-results tag

Hello there,

I have updated the Cocoon 1.8.1 from todays snapshot
and have noticed that the following does not work
anymore:

<esql:no-results>
  <error>no results were found</error>
 
<xsp:expr>response.sendRedirect(response.encodeURL("login.xml"));</xsp:expr>
</esql:no-results>

What is the new syntext in this case?

TIA


=====
Drasko

======================================
http://clubs.yahoo.com/clubs/xmlcocoon
======================================

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Re: logic in esql:no-results tag

Posted by Paul Russell <pa...@luminas.co.uk>.
On Wed, Nov 22, 2000 at 02:37:07AM -0800, Drasko Kokic wrote:
> <esql:no-results>
>   <error>no results were found</error>
>  
> <xsp:expr>response.sendRedirect(response.encodeURL("login.xml"));</xsp:expr>
> </esql:no-results>

Uh. Surely that should be <xsp:logic/>, not <xsp:expr/>?
<xsp:expr/> is designed to return teh results of expressions, not
perform state changes etc. I suspect what's actually causing your
problem is a missing <xsp:content/> tagset in the logicsheet,
but I could be wrong.

Paul

-- 
Paul Russell                               <pa...@luminas.co.uk>
Technical Director,                   http://www.luminas.co.uk
Luminas Ltd.

Re: logic in esql:no-results tag

Posted by Kevin Sonney <ke...@webslingerz.com>.
Hi Drasko!

On Wed, 22 Nov 2000, Drasko Kokic wrote:
> I have updated the Cocoon 1.8.1 from todays snapshot
> and have noticed that the following does not work
> anymore:

Correct. No results is now a child element of esql:results. So your xml
might look something like this (You'll note that I use the response
taglib for your manula redirect in the example below) :

<esql:connection>
&connection_params;
<esql:execcute-query>
<esql:query>select * from table where id=3</esql:query>
<esql:results>
<esql:row-results>
<result>I have a result of <esql:get-string coulmn="3"/>
</esql:row-results>
<esql:no-results>
<error>no results were found</error>
<response:send-redirect>
<location>login.xml</location>
</response:send redirect>
</esql:no-results>
</esql:results>
</esql:execute-query>
</esql:connection>

-- 
+-------------------------------------------+
| Kevin Sonney        kevin@webslingerZ.com |
| Systems Programmer    www.webslingerZ.com |
+-------------------------------------------+

"The weakest link in any civil rights case is always the
defendant. Imagine being a lawyer and getting a call from me. That's why I
try to, uh, behave myself." - Hunter S. Thompson