Tuesday, July 27, 2010

Re: Is this a valid uiBinder xml file?

You need to have only one container.

Wrap inside an HTMLPanel your two buttons and it'll be fine.

Cheers,

On Tue, Jul 27, 2010 at 10:59 AM, PeteUK <newbarker@gmail.com> wrote:
Hello,

Just going through the UiBinder development guide at
http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html.
The example below struck me as perhaps not being valid because there
are two widgets at the top level and when calling createAndBindUi(),
this returns just one containing element. I know this example is to do
with styling, but it just made me wonder if I'm missing something
about the binding?

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g="urn:import:com.google.gwt.user.client.ui">

 <ui:style>
   .hot { color: magenta; }
   .pretty { background-color: Skyblue; }
 </ui:style>

 <g:PushButton> styleName='{style.pretty}'>This button doesn't look
like one</g:PushButton>
 <g:PushButton addStyleNames='{style.pretty} {style.hot}'>Push my hot
button!</g:PushButton>


</ui:UiBinder>

Thanks,

Pete

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Christian Goudreau

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment