-
1. Re: Datatable fixed header
vi_mahe_ka1 Nov 15, 2011 7:11 AM (in response to olisab)Hi Sabatier,
Welcome to the Community.
here is the working code
here is the working code, which will give you vertical scroll bar
Xhtml code
<rich:extendedDataTable value="#{test.dynamicList}" width="100px"
height="350px" id="dynamicTable" enableContextMenu="false"
var="fileData" reRender="dynamicScroller"
rowClasses="datatable-odd,datatable-even"
noDataLabel="No records Founf"><a4j:support event="onRowClick"
action="#{test.selectRow}">
<a4j:actionparam name="selRow" value="#{result.frmId}"
assignTo="#{test.selectedRow}" />
</a4j:support>
<rich:column>
<f:facet name="header">
<h:outputLabel value="test header" />
</f:facet>
<h:outputText value="#{fileData}" />
</rich:column>
</rich:extendedDataTable>Managed bean code:
import java.util.ArrayList;
import java.util.List;import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean(name = "test")
@ViewScoped
public class TestManagedBean {
private List<String> dynamicList=new ArrayList<String>();
public TestManagedBean() {
for(int i=1;i<100;i++){
dynamicList.add(" proeprty "+i);
}
}
/**
* @return the dynamicList
*/
public List<String> getDynamicList() {
return dynamicList;
}/**
* @param dynamicList the dynamicList to set
*/
public void setDynamicList(List<String> dynamicList) {
this.dynamicList = dynamicList;
}}
-
2. Re: Datatable fixed header
oguzhantortop Jan 17, 2012 9:52 AM (in response to vi_mahe_ka1)hi try this it works for me for richfaces:datatable component.http://oguzhant.blogspot.com/2012/01/richfaces-datatable-fixed-header.html