Comparing your solution to mine
<!-- the new non-hardcoded way of handling invalidContinuation -->
<map:handle-errors>
<map:select type="exception">
<map:when test="invalid-continuation">
<map:generate src="cocoon:/index.html"/>
<map:serialize type="xhtml"/>
</map:when>
</map:select>
</map:handle-errors>
Shows only a few differences:
- you serialize to xml instead of xhtml
- I use only one slash '/' for calling the cocoon protocol
Robby
-----Original Message-----
From: Tomek Piechowicz [mailto:tomasz.piechowicz@gmail.com]
Sent: Monday, February 22, 2010 7:40 PM
To: users@cocoon.apache.org
Subject: Problem handling invalid continuation exception
Hi.
I have simple CForm (C2.2) with ajax repeater, and I am trying to handle
invalid continuation error. I have already added handler to my
sitemap.xmap :
<map:pipeline>
<map:match pattern="lectures-*.continue">
<map:call continuation="{1}"/>
</map:match>
<map:handle-errors>
<map:select type="exception">
<map:when test="invalid-continuation">
<map:generate src="cocoon://admin-lectures" />
<map:serialize />
</map:when>
</map:select>
</map:handle-errors>
</map:pipeline>
Generally I would like to redirect user to page (admin-lectures) but I
know it is not possible to use map:redirect-to in sitemap error handler
(why ?), so I tried to generate page with cocoon protocol but it also
doesn`t work. The problem is that when user submits form and then hit
back button in browser and tries submit form again - instead of redirect
I got javascript alert : "No response data found. Show server response
?". I see no exception in jetty console - so it is probably handled by
sitemap.
Can any one give me some tips how to perform page redirect in sitemap
error handler ?
Regards,
Tomek Piechowicz
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
|