From: Amedeo M. <ame...@in...> - 2010-01-28 15:48:33
|
ubable to get both solutions working i'll explain the problem better... the redirect i need is inside the haldleException method @Override public WOResponse handleException(Exception _exception, WOContext _context) { CFError erp = (CFError)pageWithName("CFError", _context); erp.setTrace( _exception.getStackTrace() ); erp.setMessage( _exception.getMessage() ); WOResponse response = erp.generateResponse(); if (AjaxUtils.isAjaxRequest(_context.request() )) { AjaxUtils.redirectTo(erp); } return response; } but I still receive the error page rendered inside the AjaxUpdateContainer Regards Amedeo On 27/gen/2010, at 18.30, Chuck Hill wrote: > > On Jan 27, 2010, at 5:22 AM, Amedeo Mantica wrote: > >> Hello, >> >> I have an Ajax action on my page, and works fine, but under some ecircustances, i need to get out from ajax request, so if the user click the action link, i get a new page instead of ajax response.... >> >> the easy way for me was use AjaxUtils.isAjaxRequest then generate a response with a <script>document.location.href='myDirectAction';</script>" and this works fine... >> >> but how if I want to get a component action page and not a direct action ?? >> >> Regards >> Amedeo > > Use AjaxUtils.redirectTo(WOComponent component) > > > Chuck > > -- > Chuck Hill Senior Consultant / VP Development > > Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. > http://www.global-village.net/products/practical_webobjects > > > > > > > > |