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 Grid<DataRow> grid;
|
||||
//private ToolBar toolBar;
|
||||
// protected GridInlineEditing<DataRow> editing;
|
||||
|
||||
|
||||
private TableDefinition tableDefinition;
|
||||
|
||||
private VerticalLayoutContainer container;
|
||||
|
@ -132,12 +130,9 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
|
||||
private GridAndCellSelectionModel<DataRow> sm;
|
||||
|
||||
//private TDXLiveToolItem tdxLiveToolItem;
|
||||
|
||||
private PagingToolBar pagingToolBar;
|
||||
|
||||
//private FilterPagingLoadConfig lastFilterPagingLoadConfig;
|
||||
|
||||
|
||||
/**
|
||||
* @param eventBus
|
||||
*/
|
||||
|
@ -154,7 +149,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
container = new VerticalLayoutContainer();
|
||||
container.setBorders(false);
|
||||
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, ?>> columnsNew = new ArrayList<ColumnConfig<DataRow, ?>>();
|
||||
// Retrieve Column with conlumnLocalId
|
||||
|
||||
DataRowColumnConfig<?> columnTarget = null;
|
||||
// boolean columnTargetRetrieved = false;
|
||||
for (ColumnConfig<DataRow, ?> col : columns) {
|
||||
columnTarget = (DataRowColumnConfig<?>) col;
|
||||
String columnLocal = columnTarget.getDefinition()
|
||||
.getColumnLocalId();
|
||||
if (visibleOnlyColumn.compareTo(columnLocal) == 0) {
|
||||
// columnTargetRetrieved = true;
|
||||
|
||||
columnTarget.setHidden(false);
|
||||
columnsNew.add(columnTarget);
|
||||
} else {
|
||||
|
@ -689,11 +683,6 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
.generateConfiguration(columnDefinition));
|
||||
}
|
||||
|
||||
// IdentityValueProvider<DataRow> identity = new
|
||||
// IdentityValueProvider<DataRow>();
|
||||
// LiveRowNumberer<DataRow> numberer = new
|
||||
// LiveRowNumberer<DataRow>(identity);
|
||||
// columnsConfig.add(numberer);
|
||||
|
||||
columnModel = new ColumnModel<DataRow>(columnsConfig);
|
||||
|
||||
|
@ -745,18 +734,12 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
path);
|
||||
builder.setHeader(ServletParameters.TD_SESSION_ID,
|
||||
String.valueOf(tdSessionId));
|
||||
// builder.setHeader("Content-Type",
|
||||
// "application/x-www-form-urlencoded");
|
||||
|
||||
|
||||
HttpProxy<FilterPagingLoadConfig> proxy = new HttpProxy<FilterPagingLoadConfig>(
|
||||
builder);
|
||||
proxy.setWriter(new PagingLoadUrlEncoder(staticFilters));
|
||||
|
||||
/*
|
||||
if (loader != null) {
|
||||
lastFilterPagingLoadConfig = loader.getLastLoadConfig();
|
||||
|
||||
}*/
|
||||
|
||||
loader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<DataRow>>(
|
||||
proxy, reader) {
|
||||
|
@ -776,10 +759,6 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
.setProperty("borderBottom", "none");
|
||||
pagingToolBar.bind(loader);
|
||||
|
||||
// gridView = new ExtendedGridView<DataRow>();
|
||||
|
||||
// liveGridView = new ExtendedLiveGridView<DataRow>();
|
||||
// liveGridView.setRowHeight(19);
|
||||
|
||||
grid = new Grid<DataRow>(store, columnModel) {
|
||||
@Override
|
||||
|
@ -798,8 +777,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
grid.setSelectionModel(sm);
|
||||
grid.setLoadMask(true);
|
||||
grid.setLoader(loader);
|
||||
// grid.setView(gridView);
|
||||
// grid.setView(liveGridView);
|
||||
|
||||
grid.setBorders(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(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) {
|
||||
grid.setContextMenu(contextMenu);
|
||||
} else
|
||||
|
@ -845,9 +809,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
|
||||
} else {
|
||||
Log.debug("Setup grid not null");
|
||||
// sm.onChangeNumberOfRows();
|
||||
// tdxLiveToolItem.setNoSelected();
|
||||
|
||||
|
||||
reader.setDefinition(tableDefinition);
|
||||
loader.clearSortInfo();
|
||||
|
||||
|
@ -855,26 +817,20 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
store));
|
||||
|
||||
grid.reconfigure(store, columnModel);
|
||||
// grid.setLoader(loader);
|
||||
// pagingToolBar.bind(loader);
|
||||
|
||||
|
||||
// Filter
|
||||
ArrayList<Filter<DataRow, ?>> filters = FiltersGenerator
|
||||
.generate(columnModel);
|
||||
|
||||
// gridFilters = new ExtendedGridFilters<DataRow>(loader);
|
||||
|
||||
// gridFilters.initPlugin(grid);
|
||||
// gridFilters.setLocal(false);
|
||||
|
||||
|
||||
Log.debug("Filters: " + filters.size());
|
||||
for (Filter<DataRow, ?> filterGeneric : filters) {
|
||||
gridFilters.addFilter(filterGeneric);
|
||||
}
|
||||
|
||||
loader.load();
|
||||
// lastFilterPagingLoadConfig.getOffset(),
|
||||
// lastFilterPagingLoadConfig.getLimit());
|
||||
|
||||
}
|
||||
|
||||
if (tableViewConfig != null) {
|
||||
|
@ -894,7 +850,7 @@ public class TabularDataXGridPanel extends ContentPanel {
|
|||
grid.getView().setViewConfig(
|
||||
new TabularDataGridViewConfig(tableViewConfig,
|
||||
tableDefinition));
|
||||
// grid.getView().setViewConfig(null);
|
||||
|
||||
}
|
||||
|
||||
container.forceLayout();
|
||||
|
|
Loading…
Reference in New Issue