Vaadin Widgetset compilation problem – Widget implementing an external inte

We’re trying to implement the MVP pattern using a custom Vaadin widget. In order to avoid duplicating interfaces, our first approach was making the Vaadin server-side component to implement the view interface.
But when I compile the widgetset, I got the following error:


Widgetset does not contain implementation for com.enterprise.designer.vaadin.widget.workflow.Workflow. Check its @ClientWidget mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions. Unrendered UIDL:
	com.enterprise.designer.vaadin.widget.workflow.Workflow(NO CLIENT IMPLEMENTATION FOUND) id=PID2 caption=Editorongo actionCount=1 workflowAction_0_id=1 workflowAction_0_name=addStartNode workflowAction_0_y=75.0 workflowAction_0_x=50.0

If I comment the interface (and the imports) it works ok, even if I uncomment them after building the widgetset. The code (with import/implements commented) looks like the following:


import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
//import com.enterprise.designer.workflow.presenter.WorkflowDrawArea;
//import com.enterprise.platform.i18n.api.Language;
//import com.enterprise.platform.mvp.api.ViewEventNotifier;
//import com.enterprise.platform.r13n.api.Region;
//import com.enterprise.vaadin.mvp.VaadinView;
import com.vaadin.terminal.PaintException;
import com.vaadin.terminal.PaintTarget;
import com.vaadin.terminal.Resource;
import com.vaadin.ui.AbstractComponent;
import com.vaadin.ui.Component;

@com.vaadin.ui.ClientWidget(com.enterprise.designer.vaadin.widget.workflow.client.ui.VWorkflow.class)
public class Workflow extends AbstractComponent 
//implements WorkflowDrawArea.Display, VaadinView 
{
. . .

The log doesn’t show any error (except for sources for validation api, but the same errors are shown when I comment the interface and it works ok). I tried both compiling form Eclipse plugin and from command line.

Any idea? Thanks in advance.

Crosspost: http://stackoverflow.com/questions/7744711/vaadin-widgetset-compilation-widget-implementing-an-external-interface
11961.java (5.23 KB)
11962.java (4.17 KB)

I found a workaround. If I create an intermediate class for the widget, it compiles OK. And creating a sub class of that widget and using it form Vaadin application works ok, so I can make such subclass implementing the interface from an external project:


     ________________________________
    |com.vaadin.ui.AbstractComponent |
    |________________________________|
                  ^
                 /|\
                  |
                  |
     ____________________________________________
    |com.enterprise.designer.vaadin.widget.Dummy |
    |--------------------------------------------|
    |     <@com.vaadin.ui.ClientWidget >         |
    |____________________________________________|
             ^
            /|\   ______________________________________
             |   | com.enterprise.vaadin.mvp.VaadinView |
             |   |______________________________________|
             |                         ^
             |                        /|\
             |                         | implements
             |                         |
     _________________________________________________________
    | com.enterprise.designer.vaadin.widget.workflow.Workflow |
    |_________________________________________________________|
        |
        |                  ________________________
        |                 | com.vaadin.Application |
        |uses             |________________________|
        |                           ^
        |                          /|\
        |                           |
        |                           |
     _____________________________________________________
    | com.enterprise.designer.vaadin.widget.MyApplication |
    |_____________________________________________________|

In this diagram, Dummy is the Vaadin widget (which implements the paintContent method) and Workflow is the subclass implementing the interface form other project (VaadinView). The Vaadin application (MyApplication) uses Worflow class directly.

However, it would be nice solving the problem without this workaround :slight_smile: