Yes, the client-side logic expects a JSON response in a particular
format; this format includes the content to put into the Zone, but
also JavaScript libraries to include, and JavaScript to execute after
the content is loaded ... and in 5.1 it may also include updates for
other zones.

But a <t:block> in your template with the desired text, @Inject the
Block into your page, and return the Block.

Alternately, you can return a JSONObject as the response, but you'd
need to know the Tapestry format expected by the client.

Another alternative: don't use the zone parameter of ActionLink, but
provide your own JS to send the request and interpret the response,
and update the Zone on the client side.

On Mon, Apr 27, 2009 at 2:12 PM, Geoffrey Wiseman
<geoffrey.wise...@gmail.com> wrote:
> Probably something really basic that I'm missing here -- I'm hoping one of
> you already knows the answer.  This is my first time trying
> TextStreamResponse for an ajax action link.
>
> The .tml has bits like this:
>        <t:zone t:id="actionResults" />
>
>        <t:grid ...>
>            <t:parameter name="actionsCell"><a t:type="actionLink"
> t:id="invite" context="${item.id}"
> zone="actionResults">invite</a></t:parameter>
>        </t:grid>
>
> And the .java has this:
>    public StreamResponse onActionFromInvite( EventContext context ) {
>        return new TextStreamResponse("text/html","Action taken.");
>    }
>
> And I'm getting:
> Client exception processing response: TypeError: reply is null
>
> Anything leap out as obviously wrong, or am I going to have to diagnose
> further?
>
>  - Geoffrey
> --
> Geoffrey Wiseman
> http://www.geoffreywiseman.ca/
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to