UiBinder Concept

2011-05-13 Thread Nitish Upreti
In the sample code when building GUI with UiBinder the following declaration
are very common--

  xmlns:ui='urn:ui:com.google.gwt.uibinder'
  xmlns:g='urn:import:com.google.gwt.user.client.ui'

However now when we declare an Image,we do it as *ui*:image
field='logo' src='logo.png'/ 

why *ui *and not *g *? The Image class lies in
com.google.gwt.user.client.ui package. Actually I am unclear on the sole
purpose of   xmlns:ui='urn:ui:com.google.gwt.uibinder, there is no
corresponding com.google.gwt.uibinder package in Jdocs as well.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
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.



Re: UiBinder Concept

2011-05-13 Thread Thomas Broyer
ui:image declares an ImageResource added to the implicit ClientBundle 
generated by each ui.xml file (where the ui:data and ui:style are put too, 
as DataResource and CssResource respectively).
If you want an Image widget, then yes, use a g:Image.

Note also, that ui:image are top level elements (direct children of the 
ui:UiBinder root element) while g:Image are widgets, so either they're your 
root widget (and single widget, given that they're not containers) or they 
appear inside other container widgets. In other words: it should not be 
possible to confuse them and use one for the other, it would fail very early 
(and probably be marked as an error in Eclipse).

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
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.