From line 4 changed to line 4:
<b>Use-case:</b> While a user is viewing a voting results page, values on the table are updating as people are voting. I will use the same base sample as the [a4j:repeat=>http://livedemo.exadel.com/richfaces-demo/richfaces/repeat.jsf] with <b>Runnable</b> interface implementation which is used in [a4j:push demo=>http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf] in order to simulate periodic votes being placed. This will show how to use server side events to trigger the update on client side instead of just use polling which performs full form. In real life the use-case could be much more complex - user could watch for huge tables updates . Another goal of the sample is to show how to encode and update the changed cells on the client.
<b>Use-case:</b> While a user is viewing a voting results page, values on the table are updating as people are voting. I will use the same base sample as the [a4j:repeat demo=>http://livedemo.exadel.com/richfaces-demo/richfaces/repeat.jsf] but with the <b>Runnable</b> interface implementation used in the [a4j:push demo=>http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf] in order to simulate periodic votes being placed. This will show how to use server side events to trigger the update on client side instead of just use polling which performs full form. In real life the use-case could be much more complex - user could watch for huge tables updates . Another goal of the sample is to show how to encode and update the changed cells on the client.
From line 59 changed to line 59:
Then we specify that this <b>ChoisesBean</b> class will implement <b>Runnable</b> and add the same <b>start</b>, <b>stop</b> and <b>run</b> methods as in [a4j:push demo=>http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf] in order to <b>simulate voting process</b>. Also we will define push event producer method in similar way. Next code should be added:
Then we specify that this <b>ChoisesBean</b> class will implement <b>Runnable</b> and add the same <b>start</b>, <b>stop</b> and <b>run</b> methods as in [a4j:push demo=>http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf] in order to <b>simulate voting process</b>. Also we will define push event producer method in similar way. The following code should be added:
From line 101 changed to line 101:
# After the new thread is started – it will generate new random additions to current votes in every ten seconds and raise an event to push.
# After the new thread is started – it will generate new random additions to current votes every ten seconds and raise an event to push.