Vaadin

Join Vaadin Log In
Combination View Flat View Tree View
Threads [ Previous | Next ]
Refresher
Showing 1 - 10 of 37 results.
Items per Page
Page of 4
Refresher
5/19/10 6:22 AM
While I have this component in another package (called HComponents), I've re-packaged them as single components. They are also compatible with a current Vaadin 6.2-nighty. HComponents will be deprecated.

The Refresher is a component that tries to help with the lack of a push-functionality in Vaadin. It's a component that polls asynchronous UI changes from the server. While UI changes are normally made only during a user-initiated roundtrip from the client to the server and back, with the Refresher, you can have a background process that updates the UI with the user being inactive.

While a picture tells more than a thousand words, this video tells more than a few handful of pictures.

Sources are available at the incubator at http://dev.vaadin.com/svn/incubator/Refresher/ Sources moved to http://dev.vaadin.com/svn/contrib/Refresher/, but check the Directory for the official addon entry.

You are welcome to try the component out for yourself at http://henrik.virtuallypreinstalled.com/Refresher/
Flag Flag
RE: Refresher
10/22/09 6:30 AM as a reply to Henrik Paul.
Note for interested users: These are only the sources for the component. I will later today provide a JAR file that you can just drop in, instead of needing clutter your project with sources from various package structures.
Flag Flag
RE: Refresher
10/22/09 6:14 PM as a reply to Henrik Paul.
Jar is now in SVN! (http://dev.vaadin.com/browser/incubator/Refresher/refresher-0.0.1.jar). If you're using one of the latest Vaadin 6.2 nightlies and the experimental Eclipse plugin, you should be able to just drop the jar in your classpath, agree to re-compiling your widgetset, and you should be set.

Make sure that you have the string "<inherits name="com.vaadin.incubator.refresher.RefresherApplicationWidgetset" />" in your application's widgetset.gwt.xml-file.
Flag Flag
HOWTO for beginners
10/23/09 3:00 AM as a reply to Henrik Paul.
Thanks much for the pointers, but I had to do a bit more guesswork to get things working, because my application had no widgetset to begin with (as many people I suspect, I started with AddressBook and mutated it)

A ) The first thing to do is to edit web.xml to add a widget set named after your application
 1
 2    <servlet>
 3        <servlet-name>CompetitionApplication</servlet-name>
 4        <servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
 5        <init-param>
 6            <param-name>application</param-name>
 7            <param-value>org.concordiainternational.competition.ui.CompetitionApplication</param-value>
 8        </init-param>
 9        <init-param>
10            <description>Application widgetset</description>
11            <param-name>widgetset</param-name>
12            <param-value>org.concordiainternational.competition.ui.CompetitionApplicationWidgetset</param-value>
13        </init-param>
14    </servlet>


B ) You need to create a .xml file next to the application's .java (in this case, CompetitionApplicationWidgetset.gwt.xml ). with the following content (adjust for the various widget sets you are including)
1<module>
2    <!-- Inherit super widgetset -->
3    <inherits name="com.vaadin.terminal.gwt.DefaultWidgetSet" />
4    <inherits name="com.vaadin.incubator.superimmediatetextfield.SuperimmediatetextfieldApplicationWidgetset" />
5    <inherits name="com.vaadin.incubator.refresher.RefresherApplicationWidgetset" />
6</module>


C ) Drop the various jars for the widgetsets in your WEB-INF/lib (I took the Refresher and SuperImmediateTextField jars)

D ) If you want to recompile your widget set, there is a vaadin logo in the toolbar after you install the plugin. In theory you should be able to click on your project and trigger a recompile, but for some reason, this has stopped working for me. What seems to work reliably is to click on the .gwt.xml file that defines the widgetset, and then click on the icon.
Flag Flag
RE: HOWTO for beginners
10/23/09 5:31 AM as a reply to Jean-François Lamy.
Jean-François Lamy:
Thanks much for the pointers, but I had to do a bit more guesswork to get things working...


Thanks for the comprehensive how-to steps! I sure hope R&D will be supplying us with an official step-by-step howto/checklist for these new Vaadin Addons. But, to be fair, this is a very new feature, and it's only in the nightlies for now.

The R&D team has said that they have wishes and plans that the Plugin will handle all this even more intelligently, so I, for one, will be eagerly waiting for these updates.

In any case, these pointers might serve better outside this thread – I doubt people finding these nuggets of information from this thread, if they have the same problems.

Jean-François Lamy:
D ) If you want to recompile your widget set, there is a vaadin logo in the toolbar after you install the plugin. In theory you should be able to click on your project and trigger a recompile, but for some reason, this has stopped working for me. What seems to work reliably is to click on the .gwt.xml file that defines the widgetset, and then click on the icon.


I had troubles getting the vaadin-logo-compiler to work, too. The trick I did to get it working is to use the Project Explorer (I normally use the Package Explorer, which didn't work for me), and you have to make sure that the Project Explorer is active (and not, say, your source code window) before you click on the icon – otherwise the plugin doesn't understand which project you are trying to compile. The R&D has, again, expressed their regrets about this, they have are planning on getting this more robustly done.
Flag Flag
RE: HOWTO for beginners
10/23/09 11:50 AM as a reply to Jean-François Lamy.
Just to make things a bit easier:
Jean-François Lamy:
Thanks much for the pointers, but I had to do a bit more guesswork to get things working, because my application had no widgetset to begin with (as many people I suspect, I started with AddressBook and mutated it)

A ) The first thing to do is to edit web.xml to add a widget set named after your application

No longer needed with the latest plugin, you can ignore your web.xml on this part, as long as you don't have your own widgetset in that project.

Jean-François Lamy:
B ) You need to create a .xml file next to the application's .java (in this case, CompetitionApplicationWidgetset.gwt.xml ). with the following content (adjust for the various widget sets you are including)

Again, not needed. The Vaadin Widgetset Compiler will generate this for you automatically.

Happy compiling!

ps. remember, currently only with the latest and greatest plugin & nightlies
Flag Flag
RE: HOWTO for beginners
10/23/09 6:53 PM as a reply to Jouni Koivuviita.
Well, not quite.

If I drop two jars, and omit the .gwt.xml that does the inherits for both, the plugin gets confused and seems to generate a widget set named after the first jar, and gives a warning of the form
1[WARN] Widget implementation for com.vaadin.incubator.refresher.Refresher not available for GWT compiler (but mapped for component found in classpath). If this is not intentional, check your gwt module definition file.


Your comment could be interpreted in two ways:
a) the file is no longer necessary OR
b) the plugin now deals with the file and you no longer have to.

So it seems that at least the gwt file is required.
Flag Flag
RE: HOWTO for beginners
10/23/09 7:59 PM as a reply to Jean-François Lamy.
Jean-François Lamy:
If I drop two jars, and omit the .gwt.xml that does the inherits for both, the plugin gets confused and seems to generate a widget set named after the first jar, and gives a warning of the form
1[WARN] Widget implementation for com.vaadin.incubator.refresher.Refresher not available for GWT compiler (but mapped for component found in classpath). If this is not intentional, check your gwt module definition file.

You get the warning because Henrik has made a small mistake in packaging the JAR: the source files are not included, only the compiled .class-files. The GWT Compiler needs the actual .java-files. So this is Henrik's problem, ask for a new JAR.

The Widgetset Compiler should name the generated widgetset after the project, not one single JAR, as far as I know.

Jean-François Lamy:
Your comment could be interpreted in two ways:
a) the file is no longer necessary OR
b) the plugin now deals with the file and you no longer have to.

So it seems that at least the gwt file is required.

Do you mean web.xml or the .gwt.xml?

You can ignore the thing I said about web.xml, I guess you still need to specify the used widgetset there. My mistake.

About .gwt.xml, I can't say 100% sure how this is, since I'm not involved in the code level development of the plugin. But as I interpret it, the plugin generates the .gwt.xml file for you, and uses that in the compilation.

I hope Matti will provide us with more clear instructions soon enough, since I'm probably just confusing people more emoticon
Flag Flag
RE: HOWTO for beginners
10/23/09 8:13 PM as a reply to Jouni Koivuviita.
Jouni Koivuviita:
You get the warning because Henrik has made a small mistake in packaging the JAR: the source files are not included, only the compiled .class-files.


Although this starts to get off-topic (as the refresher has its own thread), I just checked that the jar in SVN contains both .java and .class files for both the server and client side components. The same applies to the SITF jar. There must be some kind of confusion here.
Flag Flag
RE: HOWTO for beginners
10/23/09 8:16 PM as a reply to Jouni Koivuviita.
As of 2009-10-13, both the entry in web.xml and the presence of a Application.gwt.xml file are required,

In my test configuration, the plugin does not generate a .gwt.xml. Furthermore, it does not correctly generate a widgetset when two jars are present.

The workaround is to add a .gwt.xml with inheritance for the two widgetsets.
Flag Flag
Showing 1 - 10 of 37 results.
Items per Page
Page of 4