[
https://issues.jboss.org/browse/RF-13112?page=com.atlassian.jira.plugin.s...
]
Lukáš Fryč commented on RF-13112:
---------------------------------
The cause is that the method {{destroy}} is not never called.
As a workaround (and hopefully proper fix), we need to call this method before AJAX
update.
To do that properly, we can leverage DOM cleanup mechanism, and register the
"LayoutManager" as component to associated DOM element:
{code}
initialize: function($super, element, parentElement) {
$super(element, parentElement);
element.component = this;
element.component["rich:destructor"] = 'destroy';
...
{code}
The clean up will be called by
[{{memory.js}}|https://source.jboss.org/browse/RichFaces/branches/enterprise/3.3.X/framework/impl/src/main/javascript/memory.js?r=14737#to80].
As part of cleanup, the {{destroy}} method will be called.
ScrollableDataTable in TogglePanel: throws SCRIPT16389: Unspecified
error
-------------------------------------------------------------------------
Key: RF-13112
URL:
https://issues.jboss.org/browse/RF-13112
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-ScrollableDataTable
Affects Versions: 3.3.1.SP3, 3.3.3.Final
Environment: Internet Explorer 8
Reporter: Lukáš Fryč
Use following example in richfaces-demo:
{code}
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<style>
</style>
<rich:simpleTogglePanel switchType="client" label="Add AJAX
capability to existing JSF applications">
<h:form>
<rich:spacer height="30" />
<rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1"
height="400px" width="700px" id="carList"
rows="40" columnClasses="col"
value="#{dataTableScrollerBean.allCars}" var="category"
sortMode="multi">
<rich:column id="make" sortable="true">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Make"
/>
</f:facet>
<h:outputText value="#{category.make}" />
</rich:column>
<rich:column id="model" sortable="true">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Model"
/>
</f:facet>
<h:outputText value="#{category.model}" />
</rich:column>
<rich:column id="price" sortable="true">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Price"
/>
</f:facet>
<h:outputText value="#{category.price}" />
</rich:column>
<rich:column id="mileage" sortable="true">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Mileage"
/>
</f:facet>
<h:outputText value="#{category.mileage}" />
</rich:column>
<rich:column width="200px" id="vin"
sortable="true">
<f:facet name="header">
<h:outputText styleClass="headerText" value="VIN"
/>
</f:facet>
<h:outputText value="#{category.vin}" />
</rich:column>
<rich:column id="stock" sortable="true">
<f:facet name="header">
<h:outputText styleClass="headerText" value="Stock"
/>
</f:facet>
<h:outputText value="#{category.stock}" />
</rich:column>
</rich:scrollableDataTable>
<rich:datascroller align="left" for="carList"
maxPages="20"
page="#{dataTableScrollerBean.scrollerPage}" id="sc2" />
</h:form>
</rich:simpleTogglePanel>
<button onclick="var
table=#{rich:component('carList')};console.log(table);)">Click
me</button>
</ui:composition>
{code}
Steps to reproduce:
1. open
http://localhost:8080/patchtest/richfaces/dataTableScroller/examples/scro...
in IE8
2. Click "»" or page 2 of the dataTableScroller
3. Shade the simpleTogglePanel.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira