Thiago is correct in that the @HeartbeatDeferred annotation will only work
in components.

I think you might be able to achieve the same thing doing the following:

@Inject Environment environment;

Heartbeat heartbeat = environment.peek(Heartbeat.class);
heartbeat.defer(new Runnable()) {
   public void run() {
      // do stuff here with clientId's
   }
}

Cheers,
Lance.

On Monday, 5 March 2012, Paul Stanton <p...@mapshed.com.au> wrote:
> Well it seems to be working (multiple times, so it's finding the
zone/component to render) as is, however I'd prefer to implement something
that should work rather than something that just happens to work!
>
> Is lance's suggestion regarding  @HeartbeatDeferred a better idea? I
can't figure out how to implement the use of heartbeat in the context of a
service...  I tried annotating the method directly, but that didn't seem to
have any effect.
>
> Thanks, Paul.
>
> On 5/03/2012 11:12 PM, Thiago H. de Paula Figueiredo wrote:
>>
>> On Sun, 04 Mar 2012 20:25:12 -0300, Paul Stanton <p...@mapshed.com.au>
wrote:
>>
>>>
>>> On 29/02/2012 12:13 AM, Thiago H. de Paula Figueiredo wrote:
>>>>
>>>> No, you're using the t:id (server-side Tapestry component id) to
retrieve the component, so it may not have its clientId set yet.
>>>>
>>> Thiago,
>>
>> Hi!
>>
>>> If I'm using the server-side tapestry component id, than what I'm doing
is still wrong and might cause issues, since AjaxResponseRenderer expects
*clientId*, block and not *componentId*, block...:
>>
>> Yes.
>>
>>>
>>>         ClientBodyElement zone = (ClientBodyElement)
getEmbeddedComponent(container, componentId);
>>
>> but getEmbeddedComponent() expects the Tapestry server-side component
id. ;)
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to