I am new to GWT and I need to reslove this problem. I need to create a widget with gwt-links. To make it happened, I need to fetch some data from an ontology, and then based on the result, create the graph. The problem is that, when I mix java code with gwt code it doesn't want to compile.
The question is, how do I create a widged explained above that will be placed in a http page?
The code looks like this now :
public class Example1 {
@Override
public void draw() {
// Create the elements
String ontology = Ontology.get(1);
Widget labelHello = new BoxLabel(ontology);
controller.addWidget(labelHello,25,115);
// Add DnD logic
PickupDragController dragController = new PickupDragController(controller.getView(), true);
dragController.makeDraggable(labelHello);
}
public Widget asWidget() {
return controller.getView();
}
}
the Ontology.get() doesn't want to compile.