Hi everyone,
I’ve a problem and I think is related to FreeFormQuery with SQLContainer. I’m using Vaadin 6.6.2 + sqlcontainer 1.1.0.
I have a table with a big number of rows (more than 1 million) and I have a form with parameters to show a table with filtered data. The user needs to introduce parameters in order to show data in a table component.
This code works (sort with doble click in headercolumns)
// -- Build Query
TableQuery tq2= new TableQuery(TABLE_NAME,DBUtils.getConnectionPool(),new OracleGenerator(primaryKeyList));
containerSearch= new SQLContainer(tq2);
// -- Load data in table
table.setContainerDataSource(containerSearch);
table.setVisibleColumns(formTypeColOrder);
table.setColumnHeaders(headerCaptions);
table.setHeight("100%");
I have replaced the code posted by this one…this code doesn’t sort data in table (clicking on headercolumn)
String sql = "SELECT * FROM TABLE WHERE ID='"+myCode+"'";
FreeformQuery ffq= new FreeformQuery(sql, DBUtils.getConnectionPool(), "MIPK" );
try {
containerSearch= new SQLContainer(ffq);
} catch (SQLException e) {
log.error("refreshSearch", e);
}
table.setContainerDataSource(containerSearch);
table.setVisibleColumns(formTypeColOrder);
table.setColumnHeaders(headerCaptions);
table.setHeight("100%");
Any idea why the second code produces a table which is not able to sort by clicking header columns??
Thanks in advance.