Author: hlship
Date: Fri Feb 29 14:52:28 2008
New Revision: 632472
URL: http://svn.apache.org/viewvc?rev=632472&view=rev
Log:
TAPESTRY-1650: Add support for injecting (via Ajax) new content into an
existing client-side form
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java
URL:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java?rev=632472&r1=632471&r2=632472&view=diff
==============================================================================
---
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java
(original)
+++
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry/corelib/components/FormInjector.java
Fri Feb 29 14:52:28 2008
@@ -34,9 +34,8 @@
import java.util.List;
/**
- * A way to add new content to an existing Form. The FormInjector emulates its
tag from
- * the template (or uses a <div>).
- * When triggered, new content is obtained from the application and is
injected before or after the
+ * A way to add new content to an existing Form. The FormInjector emulates its
tag from the template (or uses a
+ * <div>). When triggered, new content is obtained from the application
and is injected before or after the
* element.
*/
@SupportsInformalParameters
@@ -132,14 +131,14 @@
* event notification is what will ultimately render (typically, its a
Block). However, we do a <em>lot</em> of
* tricks to provide the desired FormSupport around the what renders.
*/
- void onInject(EventContext context) throws IOException
+ Object onInject(EventContext context) throws IOException
{
ComponentResultProcessorWrapper callback = new
ComponentResultProcessorWrapper(
_componentEventResultProcessor);
_resources.triggerContextEvent(TapestryConstants.ACTION_EVENT,
context, callback);
- if (!callback.isAborted()) return;
+ if (!callback.isAborted()) return null;
// Here's where it gets very, very tricky.
@@ -163,7 +162,7 @@
}
_environment.pop(ValidationTracker.class);
-
+
FormSupportImpl formSupport = (FormSupportImpl)
_environment.pop(FormSupport.class);
formSupport.executeDeferred();
@@ -206,8 +205,6 @@
}
};
- // Replace rootRenderCommand with our more complicated setup.
-
- _pageRenderQueue.initializeForPartialPageRender(setup);
+ return setup;
}
}