Yes, the ajax response is just the html page that it should be
redirecting too. Dojo says it can't find an ajax block or parse error.

I'm not sure it's so difficult. Tapestry is catching the exception
further up from the AjaxDirectService so it should be entirely
possible to just put a try/catch block arround
cycle.activate(renderPage) and catch the exception there and send back
the necessary javascript for the redirect.

I was tempted to edit the code and add the try/catch block myself
along with a call to handleRedirect(...).  However handleRedirect(...)
needs a responseBuilder which isn't built up until afer
cycle.activate(renderPage) happens.

Assuming I can catch the exception.... what's the easiest way to send
back the redirect javascript?


On 9/7/06, andyhot <[EMAIL PROTECTED]> wrote:
> That's not going to be easy I think...
>
> I'll take a look at tapestry's RequestCycle implementation
> but i guess it catches the PageRedirectException itself, so there's no
> way for tacos to handle it.
>
> Perhaps a new IRequestCycle would be the answer...
> or look for a workaround, i.e. try not to use cycle.activate in this case
>
> BTW, do you mean that the ajax response simply contains the html of
> the final page and nothing else ?
>
>
>
> Daniel Tabuenca wrote:
> > I'm trying to catch an error during validation and forward to another
> > page. Because the error occours during the setup stage. When the
> > AjaxDirectService does the cycle.activate(renderPage)  my
> > PageValidateListener gets invoked and it throws a page redirect
> > exception which is not caught by Tacos since there is no try block
> > around the cycle.activate(renderPage) call. This causes tapestry to
> > take over rendering and return the HTML of the redirected page instead
> > of the necessary javascript to force the redirect.
> >
> > On 9/6/06, andyhot <[EMAIL PROTECTED]> wrote:
> >
> >> What's the point of calling
> >>
> >> cycle.activate(page)
> >>
> >> inside an 'ajax' listener ?
> >>
> >> What would you expect from an ajax framework to do in that case?
> >>
> >> IIRC, Tacos current behavior is to trap the cycle.activate calls and
> >> return an
> >> ajax response that instructs the client to redirect to that new page.
> >>
> >>
> >> Daniel Tabuenca wrote:
> >>
> >>> The Tapestry documentation for page events states this for the
> >>> PgeValidateListener:
> >>>
> >>> When a page is activated (selected to render the reponse). Throw
> >>> PageRedirectException  to activate a different page.
> >>>
> >>> However, in tacos the PageRedirectException isonly caught on the
> >>> invocation of the listeners. What would be the cleanest way to change
> >>> AjaxDirectServiceImpl to catch the Redirects when doing
> >>> cycle.activate(page)?
> >>>
> >>> -------------------------------------------------------------------------
> >>> Using Tomcat but need to do more? Need to support web services, security?
> >>> Get stuff done quickly with pre-integrated technology to make your job 
> >>> easier
> >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>> _______________________________________________
> >>> Tacos-devel mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/tacos-devel
> >>>
> >>>
> >>>
> >> --
> >> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> >> Tapestry / Tacos developer
> >> Open Source / J2EE Consulting
> >>
> >>
> >> -------------------------------------------------------------------------
> >> Using Tomcat but need to do more? Need to support web services, security?
> >> Get stuff done quickly with pre-integrated technology to make your job 
> >> easier
> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> _______________________________________________
> >> Tacos-devel mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/tacos-devel
> >>
> >>
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job 
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Tacos-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/tacos-devel
> >
> >
>
>
> --
> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Tacos-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tacos-devel
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to