Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@95701 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-05-14 18:37:41 +00:00
parent b815457f52
commit 09a406ccaa
3 changed files with 19 additions and 15 deletions

View File

@ -40,6 +40,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridHeaderOperationId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridOperationId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.grid.model.RowRaw;
import org.gcube.portlets.user.td.wizardwidget.client.WizardListener;
import org.gcube.portlets.user.tdtemplate.client.TdTemplateController;
import org.gcube.portlets.user.tdwx.client.TabularDataX;
@ -956,11 +957,11 @@ public class TabularDataController {
}
}
private void onRowsEdit(ArrayList<String> rows) {
if (rows == null || rows.size() == 0) {
private void onRowsEdit(RowRaw rowRaw) {
if (rowRaw == null) {
UtilsGXT3.alert("No rows selected", "No rows selected");
} else {
EditRowDialog editRowDialog = new EditRowDialog(trId, rows, eventBus);
EditRowDialog editRowDialog = new EditRowDialog(trId, rowRaw, eventBus);
editRowDialog.show();
}
}
@ -975,6 +976,7 @@ public class TabularDataController {
"OperationId: " + event.getGridOperationId());
GridOperationId gridOperationId = event.getGridOperationId();
ArrayList<String> rows = event.getRows();
RowRaw rowRaw=event.getRowRaw();
CellData cellData = event.getCellData();
switch (gridOperationId) {
@ -982,7 +984,7 @@ public class TabularDataController {
onRowsAdd(rows);
break;
case ROWEDIT:
onRowsEdit(rows);
onRowsEdit(rowRaw);
break;
case ROWDELETE:
onRowsDelete(rows);

View File

@ -6,6 +6,7 @@ import org.gcube.portlets.user.td.client.resource.TabularDataResources;
import org.gcube.portlets.user.td.widgetcommonevent.client.event.GridContextMenuItemEvent;
import org.gcube.portlets.user.td.widgetcommonevent.shared.CellData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.GridOperationId;
import org.gcube.portlets.user.td.widgetcommonevent.shared.grid.model.RowRaw;
import org.gcube.portlets.user.tdwx.client.TabularDataXGridPanel;
import com.allen_sauer.gwt.log.client.Log;
@ -51,7 +52,7 @@ public class GridContextMenu {
*
* } }); tableContextMenu.add(addRowItem);
*/
/*
MenuItem editRowItem = new MenuItem("Edit Row");
editRowItem.setId(GridOperationId.ROWEDIT.toString());
editRowItem.setIcon(TabularDataResources.INSTANCE.rowEdit());
@ -61,17 +62,18 @@ public class GridContextMenu {
public void onSelection(SelectionEvent<Item> event) {
Log.debug("gridPanel is: " + gridPanel);
if (gridPanel != null) {
ArrayList<String> rows = gridPanel.getSelectedRowsId();
GridContextMenuItemEvent eventGridContextMenu = new GridContextMenuItemEvent(
GridOperationId.ROWEDIT, rows);
eventBus.fireEvent(eventGridContextMenu);
RowRaw row = gridPanel.getSelectedRowAsRaw();
if(row!=null){
GridContextMenuItemEvent eventGridContextMenu = new GridContextMenuItemEvent(
GridOperationId.ROWEDIT, row);
eventBus.fireEvent(eventGridContextMenu);
}
}
}
});
tableContextMenu.add(editRowItem);
*/
MenuItem deleteRowItem = new MenuItem("Delete Row");
deleteRowItem.setId(GridOperationId.ROWDELETE.toString());
deleteRowItem.setIcon(TabularDataResources.INSTANCE.rowRemove());

View File

@ -45,13 +45,13 @@
<!-- Specify the app entry point class. -->
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
<!--
<!--
<set-property name="log_DivLogger" value="ENABLED" /> <set-property
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_FirebugLogger"
value="ENABLED" /> <set-property name="log_GWTLogger" value="ENABLED" />
<set-property name="log_SystemLogger" value="ENABLED" /> -->
<set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_FirebugLogger" value="DISABLED" />
<set-property name="log_GWTLogger" value="DISABLED" />