You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by rektide <re...@voodoowarez.com> on 2011/04/20 23:24:06 UTC
RenderSupport in XHR
Hi all,
Doing some XHR code. Normally I'd call RenderSupport's addInit method in my code. Here's
what I get:
Caused by: java.lang.RuntimeException: No object of type org.apache.tapestry5.RenderSupport
is available from the Environment. Available types are
org.apache.tapestry5.services.ComponentEventResultProcessor,
net.yoyodyne.components.base.ClientSchemas.
at
org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:79)
at $Environment_12f74a6bf18.peekRequired($Environment_12f74a6bf18.java)
at $Environment_12f74a6bd75.peekRequired($Environment_12f74a6bd75.java)
at $RenderSupport_12f74a6bf24._delegate($RenderSupport_12f74a6bf24.java)
at $RenderSupport_12f74a6bf24.addInit($RenderSupport_12f74a6bf24.java)
at $RenderSupport_12f74a6bde5.addInit($RenderSupport_12f74a6bde5.java)
at net.yoyodyne.components.SliderChart$ExtentsTask.reallyRun(SliderChart.java:77)
I've seen one post suggesting returning a Renderable from an action handler. This however
is far outside how our current framework works (we have an XHR service which processes a
list of tasks that generate MultiZoneUpdates, and handles execution and shifting tasks out
of the ongoing process list).
The current view from hell is that we'll be shortly making a JavaScriptInit component that
will be embedded on the component and will introduce a script tag with js code inside to
perform the init. There's revulsion and horror shared in different measure amongst the
team, and I'm really hoping someone here can provide a clean way of using renderSupport, or
some clean XHR parallel means for injecting script initialization into the MultiZoneUpdate
that's being built & sent out.
Regards,
rektide
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: RenderSupport in XHR
Posted by rektide <re...@voodoowarez.com>.
This worked! Huzzah! Thanks!
On Thu, Apr 21, 2011 at 02:37:23PM +0200, Joakim Olsson wrote:
> You can use a PartialMarkupRendererFilter to get access to
> RenderSupport (I used it to get access to JavaScriptSupport in Tap
> 5.2.4 at least).
>
> See this thread for how I used it:
> http://tapestry.1045711.n5.nabble.com/Focus-on-first-field-in-added-row-in-AjaxFormLoop-td3401558.html
>
> /Joakim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: RenderSupport in XHR
Posted by Joakim Olsson <jo...@unbound.se>.
You can use a PartialMarkupRendererFilter to get access to
RenderSupport (I used it to get access to JavaScriptSupport in Tap
5.2.4 at least).
See this thread for how I used it:
http://tapestry.1045711.n5.nabble.com/Focus-on-first-field-in-added-row-in-AjaxFormLoop-td3401558.html
/Joakim
On Wed, Apr 20, 2011 at 11:24 PM, rektide <re...@voodoowarez.com> wrote:
> Hi all,
>
> Doing some XHR code. Normally I'd call RenderSupport's addInit method in my code. Here's
> what I get:
>
> Caused by: java.lang.RuntimeException: No object of type org.apache.tapestry5.RenderSupport
> is available from the Environment. Available types are
> org.apache.tapestry5.services.ComponentEventResultProcessor,
> net.yoyodyne.components.base.ClientSchemas.
> at
> org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:79)
> at $Environment_12f74a6bf18.peekRequired($Environment_12f74a6bf18.java)
> at $Environment_12f74a6bd75.peekRequired($Environment_12f74a6bd75.java)
> at $RenderSupport_12f74a6bf24._delegate($RenderSupport_12f74a6bf24.java)
> at $RenderSupport_12f74a6bf24.addInit($RenderSupport_12f74a6bf24.java)
> at $RenderSupport_12f74a6bde5.addInit($RenderSupport_12f74a6bde5.java)
> at net.yoyodyne.components.SliderChart$ExtentsTask.reallyRun(SliderChart.java:77)
>
> I've seen one post suggesting returning a Renderable from an action handler. This however
> is far outside how our current framework works (we have an XHR service which processes a
> list of tasks that generate MultiZoneUpdates, and handles execution and shifting tasks out
> of the ongoing process list).
>
> The current view from hell is that we'll be shortly making a JavaScriptInit component that
> will be embedded on the component and will introduce a script tag with js code inside to
> perform the init. There's revulsion and horror shared in different measure amongst the
> team, and I'm really hoping someone here can provide a clean way of using renderSupport, or
> some clean XHR parallel means for injecting script initialization into the MultiZoneUpdate
> that's being built & sent out.
>
> Regards,
> rektide
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: RenderSupport in XHR
Posted by rektide <re...@voodoowarez.com>.
On Thu, Apr 21, 2011 at 06:22:02AM +0530, Taha Hafeez wrote:
> Hi
>
> What Tapestry version are you using ?
T5.1.0.6
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: RenderSupport in XHR
Posted by Taha Hafeez <ta...@gmail.com>.
Hi
What Tapestry version are you using ?
regards
Taha
On Thu, Apr 21, 2011 at 2:54 AM, rektide <re...@voodoowarez.com> wrote:
> Hi all,
>
> Doing some XHR code. Normally I'd call RenderSupport's addInit method in
> my code. Here's
> what I get:
>
> Caused by: java.lang.RuntimeException: No object of type
> org.apache.tapestry5.RenderSupport
> is available from the Environment. Available types are
> org.apache.tapestry5.services.ComponentEventResultProcessor,
> net.yoyodyne.components.base.ClientSchemas.
> at
>
> org.apache.tapestry5.internal.services.EnvironmentImpl.peekRequired(EnvironmentImpl.java:79)
> at
> $Environment_12f74a6bf18.peekRequired($Environment_12f74a6bf18.java)
> at
> $Environment_12f74a6bd75.peekRequired($Environment_12f74a6bd75.java)
> at
> $RenderSupport_12f74a6bf24._delegate($RenderSupport_12f74a6bf24.java)
> at
> $RenderSupport_12f74a6bf24.addInit($RenderSupport_12f74a6bf24.java)
> at
> $RenderSupport_12f74a6bde5.addInit($RenderSupport_12f74a6bde5.java)
> at
> net.yoyodyne.components.SliderChart$ExtentsTask.reallyRun(SliderChart.java:77)
>
> I've seen one post suggesting returning a Renderable from an action
> handler. This however
> is far outside how our current framework works (we have an XHR service
> which processes a
> list of tasks that generate MultiZoneUpdates, and handles execution and
> shifting tasks out
> of the ongoing process list).
>
> The current view from hell is that we'll be shortly making a JavaScriptInit
> component that
> will be embedded on the component and will introduce a script tag with js
> code inside to
> perform the init. There's revulsion and horror shared in different measure
> amongst the
> team, and I'm really hoping someone here can provide a clean way of using
> renderSupport, or
> some clean XHR parallel means for injecting script initialization into the
> MultiZoneUpdate
> that's being built & sent out.
>
> Regards,
> rektide
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>