• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

how do i track a child's onload event

 
Bartender
Posts: 2346
102
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a parent widget that holds a child widget.

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

eg:



 
author
Posts: 4112
28
Google Web Toolkit Eclipse IDE Flex
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
salvin francis
Bartender
Posts: 2346
102
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
He puts the "turd" in "saturday". Speaking of which, have you smelled this tiny ad?
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!