-
1. Re: Scrollable datatable and Auto scrolling on table rerende
ilya_shaikovsky Jun 29, 2009 6:44 AM (in response to apg9595)yes. rerender not keeps the scroll position. see issues in jira marked with scrollable-dataTAble component.. There are some issues on such state saving improvements. Vote for them.
-
2. Re: Scrollable datatable and Auto scrolling on table rerende
ilya_shaikovsky Jun 30, 2009 7:16 AM (in response to apg9595)sorry.. simple reRender of the table with scrollbar fixed.. So I could see that scroll position not lost anymore at 3.3.2-SNAPSHOT. Could you please check?
-
3. Re: Scrollable datatable and Auto scrolling on table rerende
ilya_shaikovsky Jun 30, 2009 7:18 AM (in response to apg9595)And b.t.w. if the data is changed (actually rows count changed) we do not know where the scroll should be after update so it resets.
-
4. Re: Scrollable datatable and Auto scrolling on table rerende
apg9595 Jul 1, 2009 11:18 AM (in response to apg9595)You are a 100% Right. The scroll position bug is fixed in 3.3.1 GA. So nothing to worry about.
The scroll position remains in the same place if the data changes in the table. So i am not sure why you state the opposite.
Here is another bug i found. I am not sure if it has something to do wit the data table or the a4j:commandlink
<h:form>
<a4j:jsFunction id="expandCollapseColumn" name="expandCollapseColumn" action="#{familyController.expandAndCollapse}" reRender="dynaColumn,expandCollapse,rowValue">
<a4j:actionparam name="selectedRowId" assignTo="#{familyController.view.selectedRowId}"/>
<a4j:actionparam name="selectedRowValue" assignTo="#{familyController.view.selectedRowValue}"/>
</a4j:jsFunction>
<rich:scrollableDataTable frozenColCount="#{familyController.view.frozenColCount}"
height="500px" width="1200px" id="grid" rows="40"
value="#{familyController.view.rows}" var="row"
headerClass ="richDataTableHeaderFont"
rowKeyVar="rowKey"
hideWhenScrolling="true"
>
<rich:columns value="#{familyController.view.columns}" var="column"
index="ind" id="dynaColumn">
<f:facet name="header" >
<h:outputText value="#{column.name}"
styleClass="richDataTableHeaderFont"/>
</f:facet>
<a4j:commandLink id="expandCollapse" value="#{!row[ind].ref.expanded?'[ + ]':' [ - ]'}" onclick="expandCollapseColumn(#{rowKey},#{ind})" rendered="row[ind].ref.expandable"/>
<h:outputText id="rowValue" value="#{row[ind].value}" />
</rich:columns>
</rich:scrollableDataTable>
</h:form>
In the above code the 2 things to notice are
1. Scrollable data table rerenders the a4j:commandLink everytime the command link is clicked.
2. When this happens, the a4j:commandLink rerenders but it does not check the "rendered=" condition.
This might be a bug
You can run the above using the following code i am attaching below.
If the jboss user forum provides a way to attach files from my prototype i will be more than happy to attach them.