GQuery Animations – how to use them

Animations are very popular and often used by web designers while creating web pages. I have covered the basics of GWT Animation in my old post. The topic seems  easy and worn-out, but I am still getting a lot of questions about using animations in GWT. That is why I  wrote some words about newest approach for animating DOM elements in modern web applications. Read more of this post


Marquee with GWT and GQuery

Some people who had read my blog, asked me about “marquee” widget in GWT.  I must admit I have never needed to use this element in any of my applications, but maybe someone would find it useful. Writing it with GQuery is so simple and fast that I have decided to share this little functionality. You may enhance this code as needed.

Technologies I have used in the project and I assume you know a little about them:

  • GWT 2.5.1
  • GQuery 1.3.3
  • Maven 3.x
  • Git i.8.x

Read more of this post

Exciting life of Entity Proxies in contexts of RequestFactory


Since  GWT 2.1  we can use special Request Factory interface to implement  data access layer to server side objects.  There are several pages  which describe how to use it properly. For me the most resourceful are :

– official explanation from GWT site

– dynatablerf project, which shows request factory in action:

– google groups where a lots of issues have been solved and questions have been answered :

– blogs and tutorials, e.g. Thomas Broyer blog:

I am using those pages really often, but still, sometimes  I am running into problems which are not described anywhere.. E.g. I was having some issues while using RequestContext’s and EntityProxies  in some typical user workflows. After learning about how it works and how it should be used correctly I have decided to share this knowledge, because I was not able to find anywhere before. I will not explain how the request factory works, if you need to make first steps on that, follow the link

Read more of this post

gwt 2.0.x gilead hibernate tutorial

UPDATE: 05.08.2013

If you came to this blog in order to learn how to manage Data transfer from Server layer to the GWT layer, please note that since 2010 GWT team has introduced new and comfortable way to do that. The mechanism is called Request Factory and you can read more about it here:

If you run to any problems you can check my other blog post where I explain how the most common update/save workflow works in Request Factory: exciting life of entity proxies.

UPDATE: 14.10.2010 – official GWT 2.1 .RC release with Request Factory

When I was writing this tutorial, there was no official GWT support for sending Entities from server to client side.  Since GWT 2.1.rc is officially released the suggested way to connect JPA or Hibernate with GWT is to use RequestFactory. Read more on :
If you are interested in gilead with gwt 2.0.4 anyway you can still read my tutorial:)

GWT Gilead tutorial – what for?

Writing client code in GWT is very nice way to produce user layout fast and easy. But when you need to get some data from the database.. debate begins. GWT has some restrictions which don’t allow you to use every framework in  every way you want. Especially if you are using object relational mapping frameworks you need to make some workaround if you want to send your entities to the client side.  E.g. you can use Data Transfer Objects (DTO) – which in some cases may be good because they encourage you to send only this information which you really need to show. But still you have to take care of cloning all your entities..
Another solution is using Gilead framework, which takes care about serializing your entities also handling lazy loaded parameters. There are some examples on the web how to use it but I haven’t found any example with the newest version of gilead and gwt as well with annotated hibernate entities.  That is why I have decided to share the steps I have made to configure such a project.
I will present you already working GWT project example which doesn’t have Gilead support. Then I will describe steps you need to take to add Gilead framework to it. If you are lazy you can just download the final version of project which is configured and ready to go.

GWT 2.0 + chrome = Unsafe JavaScript attempt to access frame with URL …

Problem description

Some time ago I have made some application in GWT 2.0, then I have compiled it and wanted to test it under Chrome browser. The effect was suprising.. google product does not work with another google product. … I have got an error message from Chrome Console:

Unsafe JavaScript attempt to access frame with URL file:///C:/workspace/war/Blog_Demonstrations.html       from frame with URL file:///C:/workspace/war/blog_demonstrations/3AA8DD86E4E2DF30F0E5F461485CF698.cache.html.  Domains, protocols and ports must match.

followed by:

Uncaught TypeError: Property ‘gwtOnLoad’ of object [object DOMWindow] is not a function

Anyway I have uploaded my application on a web-server and it appeared to work.

Why there is an error

Today I had the same problem so I’ve investigated it a little bit more.. What I have found out is : this is Chrome problem (calling it bug may be to harsh). It happens because Chrome has stricter Same-Origin-Policy than another browsers.  This policy doesn’t allow web-applications to open (via JavaScirpt) files from the file-system (they apparently are not from the same origin;] ).

Workaround solution    for testing your application on local enviroment

Solution for this problem may be sending your static HTML page files to web server. You can even use your local Server (like Jetty).

I am using temporary solution to test my compiled GWT applications under Chrome browser:

0)  launch Launch your project in development mode ( Ctrl+ F11 in Eclipse). ( The point is just to launch the server)

1)  add folder In war directory of your application create folder “chrome-test

2) gwt icon Compile your GWT project . ( all static output should be created )

3) copy Copy all output to chrome-test directory. But remember NOT TO copy WEB-INF directory. My war folder after doing this operation looks like this:war directory

4) go to web site go to

What you will see, will be compiled static gwt-page.  You can see difference between compiled page and page hosted by server by calling


Method. If it will return true it means that page you are viewing was generated by JavaScript, otherwise what you are looking at was generated by bytecode (so it is hosted java code).


bug trace from chrome dev site:

GWT balloon widget

What is Balloon widget

It is a simple widget which shows up with some information for the user. Its appearance is proceeded by some user action, like filling a form or choosing some option from the menu. It can e.g. look like this:

balloon example Read more of this post

GWT Animation – small review

Since GWT 1.5 developers can use simple animated objects. Animation is a useful tool to change properties of widget  components in continuous way. (which seems to be more friendly to end-user, when using for rational purposes).

Animation is very easy to use, you just have to extend Animation class and override onUpdate() method. Let’s see how it works in simple example

Update 1013.10.11: If you would like to see more modern way to add animations to your project, read my post about Animations with GQuery

Read more of this post