OOPHM and Vaadin 6.2-nightly

I’m wondering whether I’m doing something wrong, or I just haven’t figured out something, but how do I get OOPHM to recognize my custom widget with Vaadin 6.2?

First I tried to actually compile the widgetset with the plugin. This makes the component to work normally, but not with OOPHM. I even tried to extend WidgetMap and just return a few components, but GWT ignored my own component:

00:04:54.393 [INFO]
 Widget set will contain implementations for following components: [class com.vaadin.ui.Window, class com.vaadin.ui.CssLayout]

The only thing I get from the OOPHM console window is the friendly error warning that it knows something is being called that isn’t included in the widgetset:

00:04:54.391 [WARN]
 Widget implementation for com.vaadin.incubator.drawer.Drawer not available for GWT compiler (but mapped for component found in classpath). If this is not intentional, check your gwt module definition file.

I don’t know what to try next. I get a feeling that I would want to find the hidden wiki-page mentioned in ticket
http://dev.vaadin.com/ticket/3575
.

Is the widget in a “subpackage” of the package where your Application is? If not, this might be a problem.

No, everything is in, or under, com.vaadin.incubator.drawer. I let the plugin generate the widget’s server side and client side classes…

You just need to add gwt-dev-oophm.jar and gwt-user.jar (OOPHM version) to your project classpath (place them first in the list), and you should be all set. The GWT Compiler will then use those libraries instead of the ones downloaded by the plugin.
11111.png

I already had them. OOPHM itself seems to work correctly, because instead of my component, I get the standard “Client faced an unknown component type.” and the VUnknownComponent placeholder.

Also, as mentioned earlier, if I remove GWT’s OOPHM parameters from the URI, I see the “It works!” default text from the previously traditionally compiled widgetset.

Here are step-by-step instructions on how to use OOPHM with Vaadin 6.2 nightly:

  • Upgrade to experimental Eclipse plugin version
  • New project (select nigtly vaadin version)
  • In project settings / Build Path / Libraries replace GWT libraries with OOPHM versions from Vaadin 6.1
  • New widget (defaults are ok)
  • Select your project from the list and click “compile widgetset” button in toolbar
  • Ensure/observe that the “Widget set will contain implementations for following components” list in console contains the new widget you created
  • Run the project on server
  • Create a new debug configuration for OOPHM:
    • Select your project
    • Main class: com.google.gwt.dev.GWTShell
    • Program args: -noserver -out WebContent/VAADIN/widgetsets http://localhost:8080/MyProject/
    • VM args: -Xmx1024M
    • Add gwt-dev-oophm and source folder to classpath above project default classpath
  • Run the above oophm debug config

Also updated the
OOPHM guide in Wiki
.

Well, how stupid was this of me. Instead of having the
root
source folder, I had the first folder with source files. That settles it, then.

Sorry for the confusion, and thank you all for your help :slight_smile:

Using the latest experimental version of the Eclipse plugin, the launch can also be created from the project properties.

Updated
OOPHM guide in Wiki
.

I ran into problems with the widget map generator. It looks like it requires the [tt]
build/classes
[/tt] directory to work. I succeeded by having the following classpath in the OOPHM launch configuration settings:

[list]

[]
[tt]
gwt/gwt-dev-oophm.jar
[/tt]
[
]
[tt]
gwt/gwt-servlet.jar
[/tt]
[]
[tt]
gwt/gwt-user.jar
[/tt]
[
]
[tt]
WebContent/WEB-INF/lib/vaadin-6.2.0-nightly-.jar
[/tt]
[
]
[tt]
src
[/tt] folder
[*]
[tt]
build/classes
[/tt] folder

[/list]I just wonder why others didn’t need the [tt]
build/classes
[/tt] folder. I updated the
OOPHM guide in Vaadin Wiki
to include the step.