Minor Updated
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@92721 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1a6a214c2a
commit
651e9e6c5e
|
@ -4,12 +4,6 @@
|
|||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="tabular-data-widgetx-tdx-source-1.1.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widgetx-tdx-source/tabular-data-widgetx-tdx-source">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-widgetx-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widgetx/tabular-data-widgetx">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-widget-common-event-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-widget-common-event/tabular-data-widget-common-event">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
@ -19,16 +13,16 @@
|
|||
<dependent-module archiveName="tabular-data-wizard-widget-1.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-wizard-widget/tabular-data-wizard-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-csv-import-widget-2.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-csv-import-widget/tabular-data-csv-import-widget">
|
||||
<dependent-module archiveName="tabular-data-open-widget-2.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-open-widget/tabular-data-open-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-open-widget-2.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-open-widget/tabular-data-open-widget">
|
||||
<dependent-module archiveName="tabular-data-toolbox-widget-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-toolbox-widget/tabular-data-toolbox-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-csv-export-widget-1.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-csv-export-widget/tabular-data-csv-export-widget">
|
||||
<dependent-module archiveName="tabular-data-information-widget-2.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-information-widget/tabular-data-information-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="tabular-data-column-widget-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-column-widget/tabular-data-column-widget">
|
||||
<dependent-module archiveName="tabular-data-table-widget-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/tabular-data-table-widget/tabular-data-table-widget">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="context-root" value="tabular-data-portlet"/>
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.google.gwt.core.client.Scheduler;
|
|||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.core.client.Style.SelectionMode;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.TabPanel;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
||||
|
@ -123,9 +124,11 @@ public class TabularDataPortlet implements EntryPoint {
|
|||
GridHeaderColumnMenu columnHeaderMenu=new GridHeaderColumnMenu();
|
||||
gridPanel.addGridHeaderContextMenuItems(columnHeaderMenu.getMenu(), eventBus);
|
||||
|
||||
GridContextMenu gridContextMenu=new GridContextMenu();
|
||||
GridContextMenu gridContextMenu=new GridContextMenu(gridPanel, eventBus);
|
||||
gridPanel.setGridContextMenu(gridContextMenu.getMenu());
|
||||
|
||||
gridPanel.setSelectionModel(SelectionMode.MULTI);
|
||||
|
||||
MarginData gridData = new MarginData();
|
||||
mainPanelLayout.setCenterWidget(gridPanel, gridData);
|
||||
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
package org.gcube.portlets.user.td.client.grid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.gcube.portlets.user.td.client.resource.TabularDataResources;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridOperationId;
|
||||
import org.gcube.portlets.user.tdwx.client.TabularDataXGridPanel;
|
||||
import org.gcube.portlets.user.tdwx.client.config.Row;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.widget.core.client.menu.Item;
|
||||
import com.sencha.gxt.widget.core.client.menu.Menu;
|
||||
import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
||||
|
||||
|
@ -15,13 +24,32 @@ import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
|||
*/
|
||||
public class GridContextMenu {
|
||||
protected Menu tableContextMenu;
|
||||
protected final TabularDataXGridPanel gridPanel;
|
||||
protected EventBus eventBus;
|
||||
|
||||
public GridContextMenu(){
|
||||
public GridContextMenu(final TabularDataXGridPanel gridPanel,EventBus eventBus){
|
||||
this.gridPanel=gridPanel;
|
||||
this.eventBus=eventBus;
|
||||
tableContextMenu=new Menu();
|
||||
|
||||
MenuItem addRowItem = new MenuItem("Add Row");
|
||||
addRowItem.setId(GridOperationId.ROWADD.toString());
|
||||
addRowItem.setIcon(TabularDataResources.INSTANCE.rowInsert());
|
||||
addRowItem.addSelectionHandler(new SelectionHandler<Item>() {
|
||||
|
||||
@Override
|
||||
public void onSelection(SelectionEvent<Item> event) {
|
||||
Log.debug("gridPanel is: " + gridPanel);
|
||||
if (gridPanel != null) {
|
||||
List<Row> rows = gridPanel.getSelectedRows();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
tableContextMenu.add(addRowItem);
|
||||
|
||||
MenuItem editRowItem = new MenuItem("Edit Row");
|
||||
|
|
Loading…
Reference in New Issue