Error on resizing column in rich:extendedDataTable
ibenjes Sep 10, 2013 1:27 PMHi,
RichFaces 4.3.3 with Seam 2.3 on JBoss EAP 6.1:
I've got one rich:extendedDataTable where when I try to resize a column I get the following javascript error:
Uncaught Error: Cannot find the stylesheet for column 'evType' packed.js:11526
richfaces.ui.ExtendedDataTable.richfaces.BaseComponent.extendClass.getColumnStyle packed.js:11526
richfaces.ui.ExtendedDataTable.richfaces.BaseComponent.extendClass.setColumnWidth packed.js:11507
richfaces.ui.ExtendedDataTable.richfaces.BaseComponent.extendClass.endResize packed.js:11808
proxy jquery-1.8.3.js:775
fn jquery-1.8.3.js:3529
jQuery.event.dispatch jquery-1.8.3.js:3058
elemData.handle.eventHandle
'evType' is the ID of the column I am trying to resize (if you resize a different column you get a different id there).
The javascript code where it fails is:
getColumnStyle: function(columnId) {
var tableId = this.element.id;
var columnClass = WIDTH_CLASS_NAME_BASE + columnId;
var stylesheet = richfaces.utils.findCSSRule(function(selector) {
return selector.indexOf(columnClass) !== -1 && selector.indexOf(tableId) !== -1;
});
if (!stylesheet) {
throw new Error("Cannot find the stylesheet for column '" + columnId + "'");
}
return stylesheet.style;
},
The odd thing is I don't get that error on other tables I have and I can't see anything wrong with the table:
<rich:extendedDataTable
id="TBtrackViewE"
value="#{backingBean.results}"
tableState="#{userProfile.tableState}"
headerClass="dobr"
onRowMouseOver="tableRowColor=this.style.backgroundColor;this.style.backgroundColor=tableRowHighlight"
onRowMouseOut="this.style.backgroundColor=tableRowColor"
rowClasses="tableRowOdd, tableRowEven"
height="100%"
width="100%"
render="DVtrackview"
var="c"
styleClass="listTable dataTable">
<rich:column id="contNum" width="150" label="#{messages['number']}" sortable="true" sortBy="#{c.number}">
<f:facet name="header">#{messages['number']}</f:facet>
<h:outputText value="#{c.number}"/>
</rich:column>
<rich:column id="evDate" width="85" label="#{messages['date']}" sortable="true" sortBy="#{c.eventDatetime}">
<f:facet name="header">#{messages['date']}</f:facet>
<h:outputText value="#{c.eventDatetime}">
<s:convertDateTime type="date" pattern="#{userProfile.dateFormat}"/>
</h:outputText>
</rich:column>
....
</rich:extendedDataTable>
Has anyone else had a similar problem?