Updated Validation Panel

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@101676 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-11-21 14:29:33 +00:00 committed by Giancarlo Panichi
parent e40d73b9ab
commit f4344d5ab6
3 changed files with 31 additions and 4 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/tabular-data-table-widget-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/tabular-data-table-widget-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/tabular-data-table-widget-1.3.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/tabular-data-table-widget-1.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -32,5 +32,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/tabular-data-table-widget-1.3.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/tabular-data-table-widget-1.4.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -36,6 +36,10 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.cell.client.Cell.Context;
import com.google.gwt.dom.client.BrowserEvents;
import com.google.gwt.dom.client.Document;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.resources.client.ImageResource;
@ -211,6 +215,29 @@ public class ValidationsTasksPanel extends FramedPanel implements
validationButton.setTrueTitle("Valid");
validationButton.setFalseTitle("Error");
validationButton.addSelectHandler(new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {
Log.debug("Button Pressed");
Context c = event.getContext();
int rowIndex = c.getIndex();
int columnIndex=c.getColumn();
Element el=tree.getView().getCell(rowIndex, columnIndex);
NativeEvent contextEvent = Document.get().createMouseEvent(BrowserEvents.CONTEXTMENU, true, true,0, 0, 0,
el.getAbsoluteLeft(), el.getAbsoluteTop(), false, false, false, false,
NativeEvent.BUTTON_RIGHT, null);
//NativeEvent contextEvent = Document.get().createContextMenuEvent();
el.dispatchEvent(contextEvent);
//DomEvent
}
});
cc2.setCell(validationButton);
List<ColumnConfig<BaseDto, ?>> l = new ArrayList<ColumnConfig<BaseDto, ?>>();

View File

@ -1,3 +1,3 @@
.image {
/*cursor: pointer;*/
cursor: pointer;
}