users@woodstock.java.net

Re: Updating text fields with progress bar

From: Louis Polycarpou <Louis.Polycarpou_at_Sun.COM>
Date: Mon, 28 Apr 2008 21:54:15 +0100

Dmitry,

That's very helpful and works great for onComplete(). However, there
doesn't seem to be an onChange() event which I can call refresh on at a
given interval ( I tried using setProps(onChange:change) but this has no
effect). Essentially, what I'm trying to do is retrieve the results of
multiple WS calls and populate the fields as each one responds.

Thanks,
Louis

Dmitry Kushner wrote:
> There are couple approaches you can take:
>
> * you can update textField on the client side with Javascript - in
> response to, for example progressBar completion event:
> document.getElementById(someId).setProps(value: ' some new value');
> * or you can change the server state, and make textField update
> itself by calling refresh ( again in Javascript):
>
> document.getElementById(someId).refresh();
>
> where someId is the id of textField
>
> In either case, if you want to update view without page reload, some
> Javascript needs to be used
>
> Louis Polycarpou wrote:
>> I'm successfully running a progress bar example which updates its own
>> status at regular process intervals. I'm now looking to update other
>> text fields on the page when the progress bar is at certain intervals
>> but I can't seem to find a way to do this. I've tried binding the
>> field to a variable which I change the value of when the progress bar
>> interval changes. I've also tried finding the component instance
>> from the FacesContext and updating the TextField value with
>> setValue() but again this has no effect.
>>
>> Does anyone have an idea of how to do this?
>>
>>
>> Thanks,
>> Louis
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net For
> additional commands, e-mail: users-help_at_woodstock.dev.java.net