So, like the title says in my case height of the extendedDataTable doesn’t work, so my table also doesn’t scroll because all rows are shown. I’m using richfaces4.0-final version. So here is my piece of code:
<rich:extendedDataTable
value="#{advancedSearchView.criteria}" var="criteria"
height="50px"
selection="#{advancedSearchView.selection}" id="table"
selectionMode="single">
<rich:column id="criteria_row" filterBy="#{criteria}" filterEvent="onkeyup" width="500px">
<h:outputText value="#{criteria}" />
</rich:column>
</rich:extendedDataTable>
AdvancedSearchView is request scoped bean, and criteria is an array of Strings.
I hope that is enough information. Thank you in advance. A would really appreciate if someone gives me an answer, because I’m struggling with this for a while.
According to the RichFaces 4 VDL (View Declaration Language) documentation, the
<rich:extendedDataTable>component does not support theheightattribute at all.Your functional requirement is however understood. You want to render the extended datatable with a height of 50px and make the table body scrollable. You need to achieve this using the usual CSS means by
styleattribute which can take inline CSS declarations, or by thestyleClassattribute which can take CSS classes, like as on almost every other JSF HTML component.So, with
styleor, with
styleClass(which is also the more recommend practice; separate style from markup)and this piece in a CSS file which you include by
<h:outputStylesheet />: