GWT UIBinder - unrecognized text in g:VerticalPanel

277 views
Skip to first unread message

Blessed Geek

unread,
Jan 31, 2010, 4:05:32 AM1/31/10
to Google Web Toolkit
When you use Eclipse Google plugin to create a new EntryPoint class,
it gives you one with a simple RPC example with a DialogBox. I
translated the DialogBox to a UIBinder.

[code]
<g:DialogBox ui:field="dialogBox" text="Remote Procedure Call">
<g:VerticalPanel
styleName="{style.important}"
animationEnabled="true"
horizontalAlignment="ALIGN_RIGHT"
>
<g:Label>Sending name to the server:</g:Label>
<g:Label ui:field="textToServerLabel"/>
<g:Label>Server replies:</g:Label>
<g:HTML ui:field="serverResponseLabel"/>
<g:Button ui:field="close" text="Close"/>
</g:VerticalPanel>
</g:DialogBox>
[/code]

But GWT complains about unrecognised text in g:VerticalPanel about
these three attributes.

styleName="{style.important}"
animationEnabled="true"
horizontalAlignment="ALIGN_RIGHT"

The example ran successfully after I removed those three lines.
OK, how then do set style, animation and alignment in
g:VerticalPanel??

No, no, no ... not in the Java code, phleaze. Don't want to write
extra code to connect uibinder elements to set methods of GWT widgets.

Otherwise, what's the point in using UIBinder? It would be so much
less tedious using plain old GWT.

Where's the manual for UIBinder indicating/explaining all the usable
attributes in each corresponding GWT widget.

Blessed Geek

unread,
Jan 31, 2010, 5:13:28 AM1/31/10
to Google Web Toolkit
Never mind!

I moved stylename and animation to dialogbox from verticalpanel. It
works. Sorry for the confusion.

OK! UI Binder is Gwwweat!

Perhaps, much better than JavaFx or Silverlight (i.e., any plans for a
desktop non-servlet version of UIBinder?)
What are the plans for GWT and UIBinder for exploiting html5?

bkbonner

unread,
Feb 4, 2010, 1:30:47 PM2/4/10
to Google Web Toolkit
Hey, question for you...How do reference the DialogBox in the java
code? I was under the impression that it was only possible to do the
bind the java code to an entity with the same name. Maybe I'm missing
something here. Is the DialogBox an element of a Composite or is it a
separate definition. I'm hoping it's a separate definition, but I
can't wrap my head around how to make it happen.

Any chance you can give a larger snippet of how you're referencing the
dialog? Or maybe a working example?

Thanks,

Brian

On Jan 31, 5:13 am, Blessed Geek <blessedg...@gmail.com> wrote:
> Never mind!
>

> I moved stylename and animation todialogboxfrom verticalpanel. It

Blessed Geek

unread,
Feb 12, 2010, 8:15:37 AM2/12/10
to Google Web Toolkit

bkbonner

unread,
Feb 14, 2010, 10:39:38 PM2/14/10
to Google Web Toolkit
Hi, thanks. I'll look through this. I'm able to do it if I use an
HTMLPanel like the Mail example.

Brian

On Feb 12, 8:15 am, Blessed Geek <blessedg...@gmail.com> wrote:
> I have a rather complete explanation here.
>

> http://h2g2java.blessedgeek.com/2010/02/tutorial-gwt-rpc-stub-modifie...

Reply all
Reply to author
Forward
0 new messages