It may not work from an event handler method, as its wired into place
for the partial page render.

On Tue, Sep 2, 2008 at 7:41 AM, Chris Lewis <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I was under the impression that the use of RenderSupport to add
> javascript to an AJAX response was supported, and that scripts added in
> such a context via addScript would be executed automatically via
> tapestry.js when the response is received. Isn't that how it should work?
>
> I'm using a form with a zone to implement a "send link to friend"
> feature over ajax, but when I try to add js to execute when the ajax
> reponse completes, a ComponentEventException is thrown saying:
>
> No object of type org.apache.tapestry5.RenderSupport is available from
> the Environment.  Available types are
> org.apache.tapestry5.ValidationTracker,
> org.apache.tapestry5.services.ComponentEventResultProcessor,
> org.apache.tapestry5.services.FormSupport,
> org.apache.tapestry5.services.Heartbeat. [at context:blog/View.tml, line
> 51, column 73]
>
> I've verified in the TapestryModule#contributePartialMarkupRenderer
> method, line 1647, that a service named "RenderSupport" is being being
> added to the pipeline, which suggests that it should be available for
> injection.
>
> The page that's using (or want to use) it in an ajax response explicitly
> checks request.isXHR(), and then adds script code via
> renderSupport.addScript("");. Have I missed something?
>
> Thanks in advance,
> chris
>
> --
> http://thegodcode.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to