« Return to Thread: Updating text fields with progress bar

Re: Updating text fields with progress bar

by Louis Polycarpou :: Rate this Message:

Reply to Author | View in Thread

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@...
For additional commands, e-mail: users-help@...

--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@...

 « Return to Thread: Updating text fields with progress bar