This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes GWT and the fly likes how do i track a child's onload event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "how do i track a child Watch "how do i track a child New topic

how do i track a child's onload event

salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

I have a parent widget that holds a child widget.

I wish to do some code when a child's onLoad event is invoked.


My Website: [] Cool your mind:[] My Sally:[]
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3740

I know you can call addLoadListener for Images. For general widgets, you could create a subclass of the child then overwrite the onLoad method with:

[OCA 8 Book] [Blog]
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

I had actually thought about that and implemented it in that manner, but it didnt work,

Turned out that my application was making some ajax calls on whose completion, the view was getting populating with more values.
basically i wanted to make a parent whose height would fit that of its child but also leave a gap from the edges of the screen.
The right way i think would be to have the child give a notification to its parent when its elements are loaded completely...

The onload is fired initially before the sub-elements are loaded.

The worst thing i hate is that even a 1 px difference resolves into a vertical scrollbar and to make matters worse,
a vertical scrollbar introduces a horizontal one to compensate for that 20 px
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: how do i track a child's onload event
It's not a secret anymore!