Author: hlship
Date: Sat Mar 8 13:18:06 2008
New Revision: 635087
URL: http://svn.apache.org/viewvc?rev=635087&view=rev
Log:
TAPESTRY-2238: Return values are broken on form events in AJAX requests
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/AjaxComponentEventRequestHandler.java
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/AjaxComponentEventRequestHandler.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/AjaxComponentEventRequestHandler.java?rev=635087&r1=635086&r2=635087&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/AjaxComponentEventRequestHandler.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/internal/services/AjaxComponentEventRequestHandler.java
Sat Mar 8 13:18:06 2008
@@ -85,7 +85,7 @@
ComponentPageElement element =
containerPage.getComponentElementByNestedId(parameters.getNestedComponentId());
// In many cases, the triggered element is a Form that needs to be
able to
- // pass it's event handler return values to the correct result
processor.
+ // pass its event handler return values to the correct result
processor.
_environment.push(ComponentEventResultProcessor.class,
_resultProcessor);
@@ -93,18 +93,13 @@
_environment.pop(ComponentEventResultProcessor.class);
- // isAborted() will be true when a non-null value was returned from
the event handler method.
- // Some return types will initialize the PageRenderQueue, others will
stream a response directly.
-
- if (callback.isAborted())
+ if (_queue.isPartialRenderInitialized())
{
- if (_queue.isPartialRenderInitialized())
- {
- _partialRenderer.renderPartialPageMarkup();
- }
-
+ _partialRenderer.renderPartialPageMarkup();
return;
}
+
+ if (callback.isAborted()) return;
// Send an empty JSON reply if no value was returned from the
component event handler method.