tags:

views:

147

answers:

1

Hi, In my application,i have four columns in my datatable.Initially, except second column all the other columns displays the value. The second column values should be displayed by automatic refresh. like Initially table looks like

ID type Name Color 
1       Benz White 
2       Maruti Grey 
3       Renault orange 
4       VW pink 

After automatic refresh(Using AJAX) it should display like

ID type Name Color 
1  2012 Benz White 
2  2013 Maruti Grey 
3  2014 Renault orange 
4  2015 VW pink 

I have implement this in jsf using ajax. can any one help me out in this.

+1  A: 

Using richfaces this can be done by the reRenderattribute of some action components. Depending on the way you want to refresh the table, you could either use:

<a4j:commandButton reRender="idOftable" />

or

<a4j:support reRender="idOfTable" .. />

If using JSF 2.0, you can use the following equivallent of <a4j:support>:

<f:ajax render="idOfTable" />

Both <a4j:support> and <f:ajax> have to be nested in other components and define an event attribute, on which they are triggered (onclick, onmousemove, etc).

Bozho