You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Francisco Passos <fr...@gmail.com> on 2007/10/24 13:28:35 UTC

[Trinidad] tr:poll

Good morning!

I'm using tr:poll to periodically refresh some panels on a page during an
ongoing process in the server.
However, if the process is not running, I do not want to keep polling, so
I'm using the rendered attribute to ensure the poll object only gets
rendered if the process is running.

Which leaves me with a problem: when the process is running, the poll is in
place and periodically updating some labels on the page. But when the
process on the server ends, the following refresh causes the poll not to be
rendered and thus the fields are no longer updated... so the labels remain
with the results immediately before the process conclusion and never update
- and I need to properly present the conclusion of the process.

Has anyone encountered a similar situation? I appreciate any suggestions you
may have to point me in the right direction.

Thank you,
Francisco Passos

Re: [Trinidad] tr:poll

Posted by Francisco Passos <fr...@gmail.com>.
I managed to get this to work using an attributeChangeListener (since the
rendered attribute changes) and refreshing the data in the corresponding
listener method.

Regards,
Francisco

On 10/24/07, Francisco Passos <fr...@gmail.com> wrote:
>
> Good morning!
>
> I'm using tr:poll to periodically refresh some panels on a page during an
> ongoing process in the server.
> However, if the process is not running, I do not want to keep polling, so
> I'm using the rendered attribute to ensure the poll object only gets
> rendered if the process is running.
>
> Which leaves me with a problem: when the process is running, the poll is
> in place and periodically updating some labels on the page. But when the
> process on the server ends, the following refresh causes the poll not to be
> rendered and thus the fields are no longer updated... so the labels remain
> with the results immediately before the process conclusion and never update
> - and I need to properly present the conclusion of the process.
>
> Has anyone encountered a similar situation? I appreciate any suggestions
> you may have to point me in the right direction.
>
> Thank you,
> Francisco Passos
>