Refresher

I a trying to use Refresher add on, but getting the following error message, how do I fix it?
(I am using Vaadin 6.3.1)

Widgetset does not contain implementation for org.vaadin.henrik.refresher.Refresher. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL:

org.vaadin.henrik.refresher.Refresher(NO CLIENT IMPLEMENTATION FOUND)

Thank You

Peter

You need to compile your own widgetset that contains the standard widgets and the Refresher.

If you are using Eclipse, see
the instructions here
. Otherwise, check
the book
(the chapter also contains information about compiling widgetsets) and search the forum for relevant instructions for use with Maven, Ant etc.

Thank You, that fixed it!

Same problem, Eclipse didn’t do auto-compile widgetset even if I put refresher jar into the lib, how can I do a manual compile?
I use vaadin: 6.4.8, Eclipse plug-in: just updated today. but I didn’t see the auto compile happening when I drag the refresher jar onto WEB-INF/lib/

In the toolbar, you have a button with the symbol of a cog and a little Vaadin logo on top of it. It compiles the widgetset. Select the project or an existing widgetset (in the Project Explorer) before requesting widgetset compilation.

If the project has no widgetset of its own and you add a widget, you need to create a widgetset. If I remember correctly, simply selecting a project that has no widgetset and clicking on “compile widgetset” should create you one and update it if necessary; otherwise, create one by hand based on a template from
the book
; it will be automatically updated to refer to the add-ons you are using.

Thanks. but I am still stuck here. don’t know how to work it out. The questions are:

  1. Why drag refresh.jar file onto WEB-INF/lib/ in Eclispe didn’t trigger a widgetset auto compliation? I see the guide is saying the auto-compliing will happen when doing file, is something wrong in my Eclipse configuration?
  2. Just like a suggestion – Why the Add-on (like Refresher) itself doesn’t contain the needed widgetset but refresher-1.1.0.jar, so that the user doesn’t need to care widgetset compiling thing, just enjoy the Add-on;

I also didn’t see anything added under \WebContent\VAADIN\widgetsets\ folder after I had refresh.jar added into the lib folder.

I now can see the cog icon, while when I click it, it just popop error message - either like “select a widgetset file …” or “Error compiling widgetset, CoreException, Unable to locate WebContent folder …”

Do I need to create some xml file first then I can use Refresher Add-on?
Appreciate help again.

For 1), see below. This looks like a problem with the Dynamic Web Module facet in the project.

For 2), the add-on does contain its widgetset “fragment”, but cannot know what other widgets you might or might not want to use in the project. The widgetset in your project simply lists all those fragments that the compiled widgetset should contain.

Technically, it is possible (although rarely necessary) to e.g. have multiple different widgetsets in a single project, each containing a different subset of the available widgets. Note, though, that I would strongly recommend using a single widgetset per project unless you really know what you are doing and its consequences - e.g. you can only use a single widgetset on an HTML page.

In theory, the Eclipse plugin might be able to create the widgetset on the fly (making some assumptions that are not always optimal), but then you would not be able to compile your project outside of Eclipse with any simple build scripts.

The message “Unable to locate WebContent folder” is the critical piece of information. The Vaadin Eclipse plugin depends on the Dynamic Web Module facet to find the target directory, and cannot compile the widgetset if that facet does not know where WebContent should be.

Does your project have both the “Dynamic Web Module” and the Vaadin facet installed? How did you create the project? With the “New Vaadin Project Wizard”? With the “New Dynamic Web Project Wizard”? Otherwise? Have you modified the location of the WebContent directory from the default, and if so, how?

Which Eclipse version are you using?

Thanks, My Eclipse version is: Version: Helios Service Release 1, Build id: 20100917-0705. I use “New Vaadin Project Wizard” to create my project and copy all Vaadin samples there.
Can I get an manual way to compile the needed widgetset like to run a command script to do that? I just like to use Refresher add-on in my app without too much stuck on widgetset thing.
Do I need to modify web.xml file to support my app with Refresher add-on?
When I click the RefresherApplicationWidgetset.gwt.xml (from refresher.jar, able to see it the Eclipse) then click Cog icon to compile that, it also popup error message - “Select widgetset file”, I am totoally confused …
The sample (provided by vaadin or my other apps) works well but the app with refresher add-on.

Any tip or suggestion?

For the vast majority of users, the Eclipse plugin simply works, and I am a bit at a loss now as to what might be the problem in your case. Maybe someone else has other ideas?

In any case, your web.xml must refer to your widgetset as explained in the add-on use instructions - otherwise it will not be used even if compiled.

The file RefresherApplicationWidgetset.gwt.xml is the “widgetset fragment” of the Refresher, not a directly usable widgetset. Your own widgetset is effectively a list of such fragments to use (including the one with all the default widgets), and possibly some additional configuration. The “master” widgetset you want to compile in Eclipse must be directly in your project - not in a JAR. On the other hand, the fragments in the add-ons you depend on can and should be in their original JARs with the relevant metadata.

To manually compile the widgetset, you could e.g. adapt the
Ant scripts used by NetBeans
.

Thanks Henri again for your replies.
I was still stuck in this problem though.
I wonder what stuff or files on earth triggers Eclipse to compile widgetset successfully, in my understanding, these stuff includes the following, and I am trying to give a little more detail on my environment:

  1. the xml file inside refresher-1.1.0.jar - RefresherApplicationWidgetset.gwt.xml, contains the lines:


  2. my App source code using Refresher (just a counter app like the demo code in Vaadin)

  • In web.xml, I added the below like this, is it correct? Just like the ColorPickerApplication has, FYI - ColorPickerApplication works fine in my side.
  • MyRefresherApp com.vaadin.terminal.gwt.server.ApplicationServlet application com.lt.study.RefresherApp [b]

widgetset
com.vaadin.terminal.gwt.DefaultWidgetSet
[/b]

  1. In addition, in WebContentt/VAADIN/widgetsets/ folder there are a few folders, that comes from vaadin packages as I downloaded here. I guess if the compiling is successful, then something new should be added into com.vaadin.terminal.gwt.DefaultWidgetSet folder, correct?
    com.vaadin.demo.colorpicker.gwt.ColorPickerW
    com.vaadin.demo.gwt.OptimizedWidgetSet
    com.vaadin.demo.sampler.gwt.SamplerWidgetSet
    com.vaadin.portal.gwt.PortalDefaultWidgetSet
    com.vaadin.terminal.gwt.DefaultWidgetSet

  2. When I access the my refresh app (http://localhost:8888/MyRefresherApp), it is okay to open but giving the following error message:


Widgetset does not contain implementation for com.github.wolfie.refresher.Refresher. 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.github.wolfie.refresher.Refresher(NO CLIENT IMPLEMENTATION FOUND)

Any more suggestion?

If you need to work with add-ons etc, I would personally recommend not using the larger Vaadin demo ZIP but creating a new Vaadin project with the New Vaadin Project wizard. The Vaadin JAR will be automatically included in it, and you should not need to extract anything from it. This way, you have a clean project without the extra “junk” and complications of the project with many demos and widgetsets etc.

DefaultWidgetSet is the set of basic widgets, and you almost never want to modify it. Modifications to it would require some additional operations.

Instead, your project must contain its own widgetset, say “com/lt/study/MyWidgetset.gwt.xml”, which should look something like

<module>
<inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
<inherits name="...RefresherApplicationWidgetset" />
<!-- any other relevant settings or add-ons -->
</module>

When you compile your widgetset, VAADIN/widgetsets/com.lt.study.MyWidgetset/ will be created.

Your web.xml must then refer to com.lt.study.MyWidgetset for it to be used.

Note also that a GWT module (which can be a Vaadin widgetset) communicates more than just its contents; GWT compiler looks for client side code in certain locations relative to where the module descriptor is.

Thanks much, Henri.

Eventually
I worked it out with your helpful tips
. Here are my steps – I created a new Vaadin project then do the following:

  1. had my own widgetset.gwt.xml along with my refresher app Java code;
  2. pulled in refresher jar file from its file location into WEB-INF\lib folder of the project, this time Eclipse did trigger to auto compile widgetset and generated a new folder under VAADIN\widgetsets\com…MyWidgetset, although it takes a little long time to do that;
  3. modified web.xml to refer to the widgetset for the app that wants to use Refresher add-on

Then it works - see the counter app with refresher Add-on working

I just met another issue during this (it was solved now), after I created the new Vaadin project, Eclipse set build path under build\classes as default, that makes wrong when browser is launched to my app (giving class not found exception), after I modified the build path as "WebContent\WEB-INF\classes", it works. Not sure if this is a Vaadin plug-in bug or not.

Still thinking why this can’t work upon vaadin demo project, it should work anyway, maybe some “junk” files there (in your term :-)) makes the auto-compile on widgetset failed to be started.

Although it’s pretty old thread, I had the same problem with Refresher and couldn’t find the solution for quite some time. The problem was infamous:

Widgetset does not contain implementation for org.vaadin.henrik.refresher.Refresher. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset.

In case when you’re deploying vaadin app as a portlet (Liferay portlet in my case), you have to modify portlet.xml file similar to web.xml:

            <init-param>
                    <name>widgetset</name>
                    <value>com.liferay.YourWidgetSet</value>
            </init-param>

It is mentioned in docs for setting up netbeans, but I think it’s required in general