Hi.
I'm facing a problem with the dataTable. If I enable sorting by using the sortBy attribute of a column it works fine (on jsp side). But if I create the column dynamically as HtmlColumn in the managed bean and click on the sort icon, it doesn't do anything - no sorting, no error shown. Here is a part of the code:
private void addColumn(String attribute, String columnHeader, Class<?> expectedReturnType) { HtmlColumn column = new HtmlColumn(); HtmlOutputText header = new HtmlOutputText(); header.setValue(columnHeader); column.getFacets().put("header", header); column.setValueExpression("sortBy", JSFUtils.createValueExpression("item", attribute, expectedReturnType)); HtmlOutputText output = new HtmlOutputText(); output.setValueExpression("value", JSFUtils.createValueExpression("item", attribute, expectedReturnType)); column.getChildren().add(output); this.dataTable.getChildren().add(column); }
Problem occurs with richfaces version 3.2.0.SR1