开发者

How to invoke ajax, so that it should refresh the table and update the column

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开发者_如何学Go using ajax. can any one help me out in this.


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜