Removed Comment
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@112099 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ff7e961fcd
commit
ada62e42ee
|
@ -101,9 +101,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
|
|
||||||
private ListStore<DataRow> store;
|
private ListStore<DataRow> store;
|
||||||
private Grid<DataRow> grid;
|
private Grid<DataRow> grid;
|
||||||
//private ToolBar toolBar;
|
|
||||||
// protected GridInlineEditing<DataRow> editing;
|
|
||||||
|
|
||||||
private TableDefinition tableDefinition;
|
private TableDefinition tableDefinition;
|
||||||
|
|
||||||
private VerticalLayoutContainer container;
|
private VerticalLayoutContainer container;
|
||||||
|
@ -132,12 +130,9 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
|
|
||||||
private GridAndCellSelectionModel<DataRow> sm;
|
private GridAndCellSelectionModel<DataRow> sm;
|
||||||
|
|
||||||
//private TDXLiveToolItem tdxLiveToolItem;
|
|
||||||
|
|
||||||
private PagingToolBar pagingToolBar;
|
private PagingToolBar pagingToolBar;
|
||||||
|
|
||||||
//private FilterPagingLoadConfig lastFilterPagingLoadConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param eventBus
|
* @param eventBus
|
||||||
*/
|
*/
|
||||||
|
@ -154,7 +149,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
container = new VerticalLayoutContainer();
|
container = new VerticalLayoutContainer();
|
||||||
container.setBorders(false);
|
container.setBorders(false);
|
||||||
add(container, new MarginData(0));
|
add(container, new MarginData(0));
|
||||||
// setWidget(container);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -452,15 +447,14 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
List<ColumnConfig<DataRow, ?>> columns = columnModel.getColumns();
|
List<ColumnConfig<DataRow, ?>> columns = columnModel.getColumns();
|
||||||
|
|
||||||
List<ColumnConfig<DataRow, ?>> columnsNew = new ArrayList<ColumnConfig<DataRow, ?>>();
|
List<ColumnConfig<DataRow, ?>> columnsNew = new ArrayList<ColumnConfig<DataRow, ?>>();
|
||||||
// Retrieve Column with conlumnLocalId
|
|
||||||
DataRowColumnConfig<?> columnTarget = null;
|
DataRowColumnConfig<?> columnTarget = null;
|
||||||
// boolean columnTargetRetrieved = false;
|
|
||||||
for (ColumnConfig<DataRow, ?> col : columns) {
|
for (ColumnConfig<DataRow, ?> col : columns) {
|
||||||
columnTarget = (DataRowColumnConfig<?>) col;
|
columnTarget = (DataRowColumnConfig<?>) col;
|
||||||
String columnLocal = columnTarget.getDefinition()
|
String columnLocal = columnTarget.getDefinition()
|
||||||
.getColumnLocalId();
|
.getColumnLocalId();
|
||||||
if (visibleOnlyColumn.compareTo(columnLocal) == 0) {
|
if (visibleOnlyColumn.compareTo(columnLocal) == 0) {
|
||||||
// columnTargetRetrieved = true;
|
|
||||||
columnTarget.setHidden(false);
|
columnTarget.setHidden(false);
|
||||||
columnsNew.add(columnTarget);
|
columnsNew.add(columnTarget);
|
||||||
} else {
|
} else {
|
||||||
|
@ -689,11 +683,6 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
.generateConfiguration(columnDefinition));
|
.generateConfiguration(columnDefinition));
|
||||||
}
|
}
|
||||||
|
|
||||||
// IdentityValueProvider<DataRow> identity = new
|
|
||||||
// IdentityValueProvider<DataRow>();
|
|
||||||
// LiveRowNumberer<DataRow> numberer = new
|
|
||||||
// LiveRowNumberer<DataRow>(identity);
|
|
||||||
// columnsConfig.add(numberer);
|
|
||||||
|
|
||||||
columnModel = new ColumnModel<DataRow>(columnsConfig);
|
columnModel = new ColumnModel<DataRow>(columnsConfig);
|
||||||
|
|
||||||
|
@ -745,18 +734,12 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
path);
|
path);
|
||||||
builder.setHeader(ServletParameters.TD_SESSION_ID,
|
builder.setHeader(ServletParameters.TD_SESSION_ID,
|
||||||
String.valueOf(tdSessionId));
|
String.valueOf(tdSessionId));
|
||||||
// builder.setHeader("Content-Type",
|
|
||||||
// "application/x-www-form-urlencoded");
|
|
||||||
|
|
||||||
HttpProxy<FilterPagingLoadConfig> proxy = new HttpProxy<FilterPagingLoadConfig>(
|
HttpProxy<FilterPagingLoadConfig> proxy = new HttpProxy<FilterPagingLoadConfig>(
|
||||||
builder);
|
builder);
|
||||||
proxy.setWriter(new PagingLoadUrlEncoder(staticFilters));
|
proxy.setWriter(new PagingLoadUrlEncoder(staticFilters));
|
||||||
|
|
||||||
/*
|
|
||||||
if (loader != null) {
|
|
||||||
lastFilterPagingLoadConfig = loader.getLastLoadConfig();
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
loader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<DataRow>>(
|
loader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<DataRow>>(
|
||||||
proxy, reader) {
|
proxy, reader) {
|
||||||
|
@ -776,10 +759,6 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
.setProperty("borderBottom", "none");
|
.setProperty("borderBottom", "none");
|
||||||
pagingToolBar.bind(loader);
|
pagingToolBar.bind(loader);
|
||||||
|
|
||||||
// gridView = new ExtendedGridView<DataRow>();
|
|
||||||
|
|
||||||
// liveGridView = new ExtendedLiveGridView<DataRow>();
|
|
||||||
// liveGridView.setRowHeight(19);
|
|
||||||
|
|
||||||
grid = new Grid<DataRow>(store, columnModel) {
|
grid = new Grid<DataRow>(store, columnModel) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -798,8 +777,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
grid.setSelectionModel(sm);
|
grid.setSelectionModel(sm);
|
||||||
grid.setLoadMask(true);
|
grid.setLoadMask(true);
|
||||||
grid.setLoader(loader);
|
grid.setLoader(loader);
|
||||||
// grid.setView(gridView);
|
|
||||||
// grid.setView(liveGridView);
|
|
||||||
grid.setBorders(false);
|
grid.setBorders(false);
|
||||||
grid.setColumnReordering(false);
|
grid.setColumnReordering(false);
|
||||||
|
|
||||||
|
@ -819,21 +797,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
container.add(grid, new VerticalLayoutData(1, 1, new Margins(0)));
|
container.add(grid, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||||
container.add(pagingToolBar, new VerticalLayoutData(1, -1));
|
container.add(pagingToolBar, new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
/*
|
|
||||||
* toolBar = new ToolBar(); tdxLiveToolItem = new
|
|
||||||
* TDXLiveToolItem(grid);
|
|
||||||
*
|
|
||||||
* toolBar.add(tdxLiveToolItem);
|
|
||||||
* toolBar.addStyleName(ThemeStyles.get().style().borderTop());
|
|
||||||
* toolBar.getElement().getStyle().setProperty("borderBottom",
|
|
||||||
* "none");
|
|
||||||
*
|
|
||||||
* container.add(toolBar, new VerticalLayoutData(1, 24, new
|
|
||||||
* Margins(0)));
|
|
||||||
*/
|
|
||||||
// container.forceLayout();
|
|
||||||
|
|
||||||
// loader.load(0, liveGridView.getCacheSize());
|
|
||||||
if (contextMenu != null) {
|
if (contextMenu != null) {
|
||||||
grid.setContextMenu(contextMenu);
|
grid.setContextMenu(contextMenu);
|
||||||
} else
|
} else
|
||||||
|
@ -845,9 +809,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Setup grid not null");
|
Log.debug("Setup grid not null");
|
||||||
// sm.onChangeNumberOfRows();
|
|
||||||
// tdxLiveToolItem.setNoSelected();
|
|
||||||
|
|
||||||
reader.setDefinition(tableDefinition);
|
reader.setDefinition(tableDefinition);
|
||||||
loader.clearSortInfo();
|
loader.clearSortInfo();
|
||||||
|
|
||||||
|
@ -855,26 +817,20 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
store));
|
store));
|
||||||
|
|
||||||
grid.reconfigure(store, columnModel);
|
grid.reconfigure(store, columnModel);
|
||||||
// grid.setLoader(loader);
|
|
||||||
// pagingToolBar.bind(loader);
|
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
ArrayList<Filter<DataRow, ?>> filters = FiltersGenerator
|
ArrayList<Filter<DataRow, ?>> filters = FiltersGenerator
|
||||||
.generate(columnModel);
|
.generate(columnModel);
|
||||||
|
|
||||||
// gridFilters = new ExtendedGridFilters<DataRow>(loader);
|
|
||||||
|
|
||||||
// gridFilters.initPlugin(grid);
|
|
||||||
// gridFilters.setLocal(false);
|
|
||||||
|
|
||||||
Log.debug("Filters: " + filters.size());
|
Log.debug("Filters: " + filters.size());
|
||||||
for (Filter<DataRow, ?> filterGeneric : filters) {
|
for (Filter<DataRow, ?> filterGeneric : filters) {
|
||||||
gridFilters.addFilter(filterGeneric);
|
gridFilters.addFilter(filterGeneric);
|
||||||
}
|
}
|
||||||
|
|
||||||
loader.load();
|
loader.load();
|
||||||
// lastFilterPagingLoadConfig.getOffset(),
|
|
||||||
// lastFilterPagingLoadConfig.getLimit());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tableViewConfig != null) {
|
if (tableViewConfig != null) {
|
||||||
|
@ -894,7 +850,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
||||||
grid.getView().setViewConfig(
|
grid.getView().setViewConfig(
|
||||||
new TabularDataGridViewConfig(tableViewConfig,
|
new TabularDataGridViewConfig(tableViewConfig,
|
||||||
tableDefinition));
|
tableDefinition));
|
||||||
// grid.getView().setViewConfig(null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
container.forceLayout();
|
container.forceLayout();
|
||||||
|
|
Loading…
Reference in New Issue