Author: jcompagner Date: Sun Oct 5 11:42:34 2008 New Revision: 701844 URL: http://svn.apache.org/viewvc?rev=701844&view=rev Log: better resetting of the responses and catching exceptions on specific places to reset the buffers and Response objects WICKET-1450
Modified: wicket/trunk/wicket/ (props changed) wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Propchange: wicket/trunk/wicket/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Oct 5 11:42:34 2008 @@ -1 +1 @@ -/wicket/branches/wicket-1.3.x/jdk-1.4/wicket:653208,653212,653215,653226,653231,654304,655446,655466,655786,658141,658189,659118,659120,662360,663058,671549,671885,687145-688996,698530-698577,701132-701133 +/wicket/branches/wicket-1.3.x/jdk-1.4/wicket:653208,653212,653215,653226,653231,654304,655446,655466,655786,658141,658189,659118,659120,662360,663058,671549,671885,687145-688996,698530-698577,701132-701133,701843 Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java?rev=701844&r1=701843&r2=701844&view=diff ============================================================================== --- wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/RequestCycle.java Sun Oct 5 11:42:34 2008 @@ -1352,6 +1352,7 @@ // if a redirect exception has been issued we abort what we // were doing and begin responding to the top target on the // stack + response.reset(); currentStep = RESPOND; } } Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=701844&r1=701843&r2=701844&view=diff ============================================================================== --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Sun Oct 5 11:42:34 2008 @@ -782,10 +782,22 @@ { // ignore this one could be a result off. } + // Restore original response + RequestCycle.get().setResponse(originalResponse); + encodingBodyResponse.reset(); throw e; } - component.renderComponent(); + try + { + component.renderComponent(); + } + catch (RuntimeException e) + { + RequestCycle.get().setResponse(originalResponse); + encodingBodyResponse.reset(); + throw e; + } page.endComponentRender(component);