Re-rendering of the complete page leads to the problem that a data
table is shown from the very first row and not at the position it was
visible before. Using the construct the re-rendering of the page can
be customized in a way to get back to the previously ued position on
hte page. This doesn't works when having a t:dataTable within a
<t:div></t:div> section with overflow set to auto.
I want to get rid of the t:dataScroller and to have a scrollbar what
makes work with long tables much easier.
How I can customize the rendering to get back the same position of the
data table?
Having the following construct to realize a scrollable data table
within a fixed size section with overflow=auto:
<t:div styleClass="entry" style="margin-top:20px;height:200px;
overflow:auto;" rendered="#{not empty logfileList}">
<t:dataTable id="dss" styleClass="scrollerTable"
style="width:610px"
headerClass="standardTable_Header"
footerClass="standardTable_Header"
rowClasses="table_RowSingleCenter"
columnClasses="select_Column,standardTable_Column,standardTable_ColumnRight,
standardTable_ColumnRight,standardTable_Column"
var="log"
value="#{logfileList}"
preserveDataModel="false"
border="1">
<h:column>
<h:commandLink action="#{selectLogfile}" >
<f:param name="id" value="#{filename}"/>
<f:param name="logfilename" value="#{filename}"/>
<h:graphicImage value="#{path}"
style="border:0px"
title="#{dbm_messages['txt_pressToSel']}"/>
</h:commandLink>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText
value="#{dbm_messages['ch_logfiles']}" />
</f:facet>
<h:outputText value="#{filename}"
style="color:#{log.colour}; text-align:left;" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText
value="#{dbm_messages['ch_loglines']}" />
</f:facet>
<h:outputText value="#{numberOfLines}"
style="color:#{colour}; text-align:right;"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText
value="#{dbm_messages['ch_logbytes']}" />
</f:facet>
<h:outputText value="#{filesize}"
style="color:#{colour}; text-align:right;"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText
value="#{dbm_messages['ch_directdisp']}"
/>
</f:facet>
<h:outputText value="#{contentDirectDisplayHint}"
style="color:#{log.colour}; text-align:left;"/>
</h:column>
</t:dataTable>
</t:div>
Thanks alot!
Olaf