-
1. Re: Update DataGrid
ilya_shaikovsky Jul 10, 2009 5:26 PM (in response to roman.mandeleil1)any rich data Iteration component supports that. You just should point reRender of the poll component to the components iniside iteration component (inside column for table). It will be x-axis. and fill ajaxKeys set with row keys of rows which should be updated. It will be y-axis.
Simplest sample (only cells from the row where request was initiated update) at richfaces-demo. a4j-repeat sample. -
2. Re: Update DataGrid
roman.mandeleil1 Jul 13, 2009 10:12 AM (in response to roman.mandeleil1)Hi Ilya,
Can you please be more specific: for example I have that code
for the data grid, now it polls data for all the data grid.<a4j:poll id="poll" interval="500" reRender="dataGrid_1" /> <rich:dataGrid value="#{dataList}" var="dataVar" columns="3" elements="9" width="80%" cellspacing="0" frame="void" id="dataGrid_1"> <rich:panel id="onePanel" > <center> </f:facet> <h:panelGrid columns="3" border="0" style="text-align:left"> <div/> <h:outputText value="#{dataVar.value}" /> <div/> </h:panelGrid> </center> </rich:panel> </rich:dataGrid>
Now let's say I have key for each dataList element, and I will
check what element has changed on the server, how I can
ensure that poll element will refresh only cells that has been
changed ?
Thanks in advance. -
4. Re: Update DataGrid
roman.mandeleil1 Jul 13, 2009 11:19 AM (in response to roman.mandeleil1)Sorry guys I think you are missing my point, I don't mean to update
the grid by the user and than to save it to the server side.
I am looking for the option to refresh data on the web page but not
the full data grid but just the cells that changed. -
5. Re: Update DataGrid
ilya_shaikovsky Jul 13, 2009 11:34 AM (in response to roman.mandeleil1)and we're talking about that.
-
6. Re: Update DataGrid
roman.mandeleil1 Jul 13, 2009 1:42 PM (in response to roman.mandeleil1)Thanks, works like magic !!!
-
7. Re: Update DataGrid
roman.mandeleil1 Jul 13, 2009 1:50 PM (in response to roman.mandeleil1)One more question: when you update the table in that partial
way which event do you use ? I need to know because I want to attach
highlight effect for the update.
Thank in advance -
8. Re: Update DataGrid
ilya_shaikovsky Jul 14, 2009 3:47 AM (in response to roman.mandeleil1)not sure that get it. In your case the even of update is just timer.. Or you mean something else?
-
9. Re: Update DataGrid
roman.mandeleil1 Jul 14, 2009 4:55 AM (in response to roman.mandeleil1)I mean if you have three lines
in the table and one of it was
updated, how I make it to highlight ? -
10. Re: Update DataGrid
ilya_shaikovsky Jul 14, 2009 5:06 AM (in response to roman.mandeleil1)you could bind the styleClass on column to iteration variable property and fill with some class dynamically.
-
11. Re: Update DataGrid
ilya_shaikovsky Jul 14, 2009 5:08 AM (in response to roman.mandeleil1)in your case for panel sorry.