Custom widget child elements

2014-01-03 Thread Ben Cuthbert
Hi All,

I have created a custom widget that extends ComplexPanel so that it can 
have children.

The UIBinder looks like so

layout:Layout ui:field=layoutPanel

 layout:top

  g:HTMLPanel styleName=links-container

  /g:HTMLPanel

 /layout:top

 /layout:Layout


In the Layout class that extends ComplexPanel I have a method to add to top


@UiChild( tagname = top )

public final void addTopPanel(Element widget) {

 addPanelToParent(TOP_CONTENT_TAG, widget);

 }


The issue I see is that when UIBinder builds the page it trys to load the 
child element of layoutPanel before building and calling onLoad of 
layoutPanel. The child needs to the parent element layoutPanel to be 
initialised before it attempts to load itself onto the parent if that makes 
sense. Basically like the Document.ready(), once that is called the child 
can add to the parent.

The only way around this was to create an eventBus msg and fire it into the 
application once the entire app has loaded and then manually create a class 
of the Child widget and add it to the parent. 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.


Converting JavaScript project to GWT component

2013-03-12 Thread Ben Cuthbert
Has anyone got any good tutorials on converting Javascript projects 
like http://needim.github.com/noty/ to GWT components?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




GWT compiler .java files

2012-10-25 Thread Ben Cuthbert
All

I when I add my modules .java files into the jar and pass it to my 
application the compiler works. But when I put the .java files of the 
module into a -sources.jar and then add that to the classpath of my 
application the compile does not work, and I get the following error.

ERROR] Line 48: No source code is available for type

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Xm-oeMSHokoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.