tags:

views:

823

answers:

2

Hi All,

I am using richfaces's component extendedDataTable and I need to extend the grid height to show all the rows without using a scroller. To do so I have added a java script method to run on page load. This method aims to resize the grid.

The reason that I couldn't do this in code isI dont know the height of each row as it is not fixed beacuse word wrapping is allowed.

My problem is , When an ajax action occurs and the extendedDataTable rendered the onLoad is not executed again. So How I can execute a javascript method after the completion of an ajax request ?

Thanks

A: 

Hi ,

Are you explicitly setting the "height" attribute for the extendedDataTable or for the div that encloses it. Well, I have done a similar kind of application ,in which extendedDataTable size should not exceed some fixed bounds(say 600px X 600px).Similar is case with individual columns, which are of fixed width(say 60px). This I am doing by explicitly setting the "width" property for rich:extendedDatatable and rich:column to fixed dimension. So if the no of rows exceeds,the scroll bar appears. Now I want my data(which is a very very long string) in each cell to be wrapped, and not exceed the given column width(60px), but not able to do that ? Currently, extendedDataTable trims the string for first 60px and puts... after that !! It would be great if you can provide some insight on this.

Regards, KB

KB
A: 

Instead of trying to listen for the data table being reRendered, wrap the table and your JavaScript in another component, such as an h:panelGroup. Give the h:panelGroup an id and reRender it instead of the rich:dataTable.

Christopher Parker