-
1. Re: Updating table in real time. I have some problems with it
akaine Nov 6, 2010 5:19 PM (in response to pechnik)1 of 1 people found this helpful1. I hope you put the a4j:poll inside a form, if not it won't work. Set action attribute pointing to a method updating the dataTable's List source. Sometimes updating a dataTable directly doesn't work for me so I prefer to enclose it inside a rich:panel or something and rerender the last one.
As for th rest, the aproach described above should work with default configs.
-
2. Re: Updating table in real time. I have some problems with it
ilya_shaikovsky Nov 8, 2010 3:18 AM (in response to pechnik)1 of 1 people found this helpful1) yup, poll should works fine for you.
Except that approach - you could also consider push component. http://livedemo.exadel.com/richfaces-demo/richfaces/push.jsf?tab=choices&cid=54212 It's not fires complete submit with invocation of JSF lifecycle till event for update not risen(poll does full submit every interval time.).
2. How cache can be turned of? I need to display real data, not the data from the cache.
3. Where can i find how components.xml must look like? I tried to place such thing into components.xml <components> <web:ajax4jsf-filter enable-cache="false" /></components>. But it didn`t work.
4. What other advises can you give me for solving this task?
which cache do you mean.
-
3. Re: Updating table in real time. I have some problems with it
pechnik Nov 8, 2010 6:25 AM (in response to akaine)Yes I have puted table into a form.
What did you mean
Akaine Harga wrote:
Set action attribute pointing to a method updating the dataTable's List source.
I don`t understand what I need to put into action method. Can I see the exmple of these?
-
4. Re: Updating table in real time. I have some problems with it
akaine Nov 8, 2010 1:23 PM (in response to pechnik)<a4j:poll id="poll" interval="500" reRender="myId" action="myBackingBean.refillDataTableValue" />
public void refillDataTableValue(){
myDataTableValue = refillFromDataBase(); //or whatever place you have the data stored for the list
}