GWTQuery 1.1.0 integration with Vaadin 6.7.1

I’ll try to integrate GWTQuery 1.1.0 and Vaadin 6.7.1. The process was:

  1. Create a maven vaadin project for the 6.7.1 version from the standard archetype.

  2. include the dependency for gwtquery 1.1.0, and include a new custom component.

    my gwt xml descriptor module GWTQueryWidgetSet.gwt.xml is :

[b]

<inherits name="com.google.gwt.query.Query" />

<set-property name="user.agent" value="safari"/>
[/b]
  1. Create a custom vaadin component in the same projetc extend from widget class from gwt api and used the GQuery class of the gwtQuery framework to use the animations offered with jquery and gwtquery.

  2. I used this custom component inside a vaadin application example of the same project of course.

  3. Compile the widgetset and deploy in tomcat, the process is correct the widgetset is created with the new custom component inside.

  4. The ERROR is:

    a) First I used the gwt debugger and use the uri: http://localhost:8080/myGWTQuery?gwt.codesvr=127.0.0.1:9997 to open the app. The applicaction of vaadin is opened and my custom component work well, not exist any problem :slight_smile:

    b) if I open the vaadin aplication directly without the gwt debugger, that is, the uri is: http://localhost:8080/myGWTQuery I obtain a javascript error:

     [b]
    

JavaScriptException: (TypeError): Cannot read property ‘classElement’ of undefined
[/b] in the file *.cache.html of the widgetset created.

What is the error?, Why if i load my example throw the gwt debugger everything is good and if i load the application throw the normal uri i obtained this error?

Best regards.

Hi,

The experience differences between hosted mode and the actual compiled version are quite common yet sometimes hard to fix. The best bet in such case would be to gwt compile the project with the following properties set for gwt maven plugin:

<style>PRETTY</style>
<draftCompile>true</draftCompile>

After that FireBug or your other favorite tool would be more descriptive about what actually happened.

HTH
sasha

Thanks Alexander,

It’s truth, I add the style tag to my maven project and I discover than the problem is mine. I was not checking with hasAttribute some attributes. This is because i was obtaining the javascript error :slight_smile: stupid error.

But now i have other problem not error:

I’m my example app i was sliding different layout in the similar way that github use. But the problem is:

  1. i have a slider (absolute layout) where i add some slides (customcomponent) on it;
  2. i use gwtquery to order the slides inside the slider. One slide near the other (with the css left attribute) and use the animations to roll between.

The problem is:

So the last slide is inserted in the absolute layout, this is the slide that vaadin show initially, but how can control this if the construction of the slides is in the init of my application?. If I debug with gwt i discover that the collection of slides don’t apper in html until the init function finished. Exist any way to control this behavior? I override the attach function of the slider but the problem persist

Best regards


The problem is SOLVED!!

I resolved the problem of my slider custom component.

My component simulate in VAADIN the iPhone style movement (similar to touchkit, but in PC) using the GWTQuery framework to animate the slides of my slider container with some events. The slide could be any component usually will be CustomComponent’s.

When I had time, i’ll create a vaadin addon to use this great component. :grin:

Best regards.

Hi Miguel, did you make an addon using gwtquery?

or do you have any sample code for this vaadin-gwtquery integration?

thanks