Refresher

Thanks, that is better searcher.

Now I have next problem.

In broswer I am getting

[color=#3A06F8]
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) id=PID3 pollinginterval=1000
[/color]

or

[color=#3A06F8]
HTTP Status 500 -

type Exception report

message

descriptionThe server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/vaadin/henrik/refresher/Refresher

root cause

java.lang.NoClassDefFoundError: org/vaadin/henrik/refresher/Refresher
[/color]

I am using Eclipse. I added

<init-param>
	<param-name>widgetset</param-name>
	<param-value>org.vaadin.henrik.refresher.RefresherApplicationWidgetset</param-value>
</init-param>

to my web.xml

and

to my *Widgetset.gwt.xm but it is always replaced with standard .

I also added refresher-1.0.0.jar to my libraries and checked to include it in Properties → Java EE Module Dependences .

My program is as simple as Refresher example from here http://dev.vaadin.com/browser/contrib/Refresher .

Any suggestions what to do?

Thanks,
Arthur.

OK, problem solved.

  1. NO refresher-1.0.0.jar in libraries

  2. NO refresher-1.0.0.jar checked in Properties → Java EE Module Dependences

  3. NO in web.xml

  4. YES in *Widgets.gwt.xml

  5. YES refresher-1.0.0.jar in WebContent/WEB-INF/lib/

If program is written in Scala then uncheck “java builder” in properties → builders (‘scala builder’ is checked).

Thanks:)

Sorry about being too lazy to update this thread about its current whereabouts. I guess I just assumed everyone had already found the Directory. Well, you know what they say about making assumptions…

Great that you got that fixed, and even more awesome that you’re using Scala with this!

Yes, I love Scala, I am using it for 2.5 year and it is future for many java developers.

I choosed to take a look at Vaadin because of possibility to use Scala - I don’t want to go back to Java.

I hope Vaadin team also should consider to start using Scala, many things will be much easier :).

Arthur.

I’m trying to deploy the sample application (RefresherApplication) to Liferay as portlet 2.0, but I keep getting the following error:

[color=#FF0000]
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) id=PID3 pollinginterval=1000
[/color]

I’m using the Vaadin plug-in for Eclipse 3.5 as outline in the Plug-in different sections, re-gwt-compiling does not work either.

I added the refresher-1.0.0.jar into the
WebContent/WEB-INF/lib folder

My *Widgetset.gwt.xml looks like:
[font=Courier New]

<?xml version="1.0" encoding="UTF-8"?>
<!--
 Uncomment the following to compile the widgetset for one browser only.
 This can reduce the GWT compilation time significantly when debugging.
 The line should be commented out before deployment to production
 environments.
  
 Multiple browsers can be specified for GWT 1.7 as a comma separated
 list. The supported user agents at the moment of writing were:
 ie6,ie8,gecko,gecko1_8,safari,opera
 
 The value gecko is used for Firefox 3 and later, gecko1_8 is for
 Firefox 2 and safari is used for  webkit based browsers including
 Google Chrome.
-->
<!-- <set-property name="user.agent" value="gecko"/> -->


<inherits name="org.vaadin.henrik.refresher.RefresherApplicationWidgetset" />
[/font]

Any suggestions?

Thanks,
Julio V.

Sorry, I can’t find any problems with the info you posted - afaik, it should work as long as you compile the project’s widgetset (which, apparently, you already has done).

I’ve never tried using the Refresher in a portlet (someone with portlet experience could chime in…), so you never know whether there’s something interfering there. You could try Artur’s
ICEPush
, if you have better luck with that.

Hope you get your app working.

Hi Julio,

make sure you have done the following two things.

  1. In a portal environment you must copy the compiled widgetset into the
    /html/VAADIN/widgetsets/
    directory under the Liferay installation. See also
    this section
    of the Book of Vaadin about installing Vaadin to Liferay.

  2. Make sure you have defined the widgetset to be used by your portlet application in the
    portlet.xml
    file or in the
    portal-ext.properties
    file.

Teemu,

The instructions were right on target.
Thanks a lot.
Julio V.

Is there a Maven repository where I can fetch the plug-in from ? Or do I have to upload the plug-in by hand in my own maven repository?

Thanks,
Julio V.

Sorry, no Maven repo for Refresher (afaik). I’ve put it only in the Directory.

Refresher works fine on Tomcat server. But, it seems not working on Google App Engine.

web.xml (Tomcat server configuration)

com.vaadin.terminal.gwt.server.ApplicationServlet

web.xml (Google App Engine (GAE) configuration)

com.vaadin.terminal.gwt.server.GAEApplicationServlet

Any idea or suggestion would be appreciated!.

Unfortunately, I don’t use GAE, so I can’t support it either :confused:

I’ve used Refresher without problems in a GAE project. I didn’t do anything special, just add it like any other addon, compile the widgetset, and use it.

Does it work for you in the Jetty based GAE dev server?

hi

thanks for the liferay pointers… Had tried both these options with liferay 6.0.2 version

  1. Have copied to ROOT/html/VAADIN/widgetset from the eclipse project after compiling.

  2. my portlet.xml looks like follows

    Testingpush Application portlet
    TestingPush

     <portlet-class>com.vaadin.terminal.gwt.server.ApplicationPortlet2</portlet-class>
     <init-param>
         <name>application</name>
         <value>com.example.testingpush.TestingpushApplication</value>
     </init-param>
    [b]
    
	<name>widgetset</name>
	<value>com.vaadin.incubator.refresher.RefresherApplicationWidgetset</value>
</init-param>

[/b]

After adding the #2, portlet is not displaying any UI components like labels. and no error message even with ?debug option

if i remove above bold section, it is display correctly …but refresher not working.

Any clue to proceed on this? Any way to debug this

Appreciate your help

thanks
Joseph

Hi Henrik,

thanks for the link with icepush… Tried with Liferay 6.0.2

ICE push has Only servlet deployment support…

// Push changes
ApplicationContext context = app.getContext();

if (context instanceof WebApplicationContext) {

PushContext pushContext = PushContext
.getInstance(((WebApplicationContext) context)
.getHttpSession().getServletContext());
pushContext.push(ICEPush.PUSH_GROUP);
} else {

throw new RuntimeException(“Only servlet deployment is supported”);

}

Recently, Seen that they have added support portal support too
http://jira.icefaces.org/browse/PUSH-65?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

Any idea how this can be intergrated with Vaadin addon

Appreciate all your advice

thanks
Joseph

You might want to use your own widgetset, which lets you add also other widgets to it when you need them.

I assume that the widgetset you use does inherit the default widgetset and the refresher widgetset, and the compilation went without errors, but do check that both the standard components and the refresher were included in the widgetset (select verbose widgetset compilation in Project properties → Vaadin and recompile the widgetset).

Is your Liferay deployment using the same version of Vaadin with which you compiled the widgetset?

If the widgetset compilation succeeded, the most likely cause is a version mismatch between the Vaadin JAR used and the widgetset - in that case, either downgrade the Vaadin version you are using to that included in your Liferay installation, or upgrade the Liferay installation Vaadin JAR, themes and widgetsets.

As for the other question (about ICEPush use in portlets), Artur can probably answer it in the other thread where you asked it when he comes back from vacation.

That looks wrong. You should have a custom compiled widgetset for your application, and not use Refresher’s widgetset. If you’re using Eclipse, and your project is a Vaadin project, you should be able to compile your widgetset with the blue vaadin-icon in the toolbar. Otherwise, I don’t know how a widgetset should be compiled for Liferay.

(…yeah, what Henri said)

Agree… The custom compiled widget-set name should be in the portlet.xml and also in portal-ext.properties…

It works like a charm after I set the name in both files and restart the liferay portal.

Thanks. You guys rock!!

Jason

Hi, i have an array of components which are getting produced dynamically, according to user choices.
These components (custom StyleCalendars), should have their layout updated from the server (data changes).

How can i achieve this using Refresher?

If there is only the current user affecting what needs to be shown, you don’t need Refresher - the plain old Vaadin actionage with ValueChangeListeners will suffice.

However, if there are asynchronous data changes from simultaneous user activity, Refresher is what you need. Since I’m not sure what your question is exactly, I’m stabbing a bit in the dark here: First of all, you need to put a Refresher somewhere in a currently active layout. Think of it as an invisible component - if the component is not in “view”, it won’t work. Then you’ll probably need a Thread running in the background, periodically checking how the data changes, and on each cycle update the data into the components you’re showing. This allows Refresher to poll for changes to render.

For more information about Java threads, Google has plenty of good examples. I’ve always liked those in
JavaWorld
. Hope this helps.