It started as the standard Eclipse plugin generated application, and I
have discarded virtually everything.
What's left is:
public class TestUi implements EntryPoint {
@UiTemplate("TestUi.ui.xml")
interface TestBinder extends UiBinder<VerticalPanel, TestUi> { }
private static TestBinder testBinder = GWT.create(TestBinder.class);
public void onModuleLoad() {
VerticalPanel vp = testBinder.createAndBindUi(this);
RootPanel.get().add(vp);
}
}
----------------------------------------------------------------------
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:style>
.pretty { background-color: pink; }
</ui:style>
<g:VerticalPanel class='{style.pretty}' >
</g:VerticalPanel>
</ui:UiBinder>
-------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='testui'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.user.theme.standard.Standard'/>
<!-- Other module inherits -->
<inherits name="com.google.gwt.uibinder.UiBinder" />
<!-- Specify the app entry point class. -->
<entry-point class='com.axxessible.testui.client.TestUi'/>
<!-- Specify the paths for translatable code -->
<source path='client'/>
</module>
-----------------------------------------------------------------------------
errors during compile, the lines below are in exactly the sequence shown:
Invoking com.google.gwt.dev.javac.StandardGeneratorContext@45800894
[ERROR] In <g:VerticalPanel class='{style.pretty}'>,
class VerticalPanel has no appropriate setClass() method
[ERROR] Errors in
'file:/home/john/workspace/TestUi/src/com/axxessible/testui/client/TestUi.java'
[ERROR] Line 32: Failed to resolve
'com.axxessible.testui.client.TestUi.TestBinder' via deferred binding
If I take out the class='----' out of the <g:VerticalPanel> then it
compiles. But if it's a panel widget, it should be able to set a
background-color, no?
I already know I'm doing something incredibly stupid, so I don't mind
if you skip telling me that part, and just tell me what it is!!
Thanks.
John
Hope that helps.
--
Arthur Kalmenson
> --
> 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-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
>
>
In the older GWT versions, I know you set the stylename and used a
conventional CSS style sheet with those names.
I thought UIBinder was a whole new thing--I was trying to follow the
tutorials as closely as possible, and they inserted class=xxxx, which
is one of the standard ways of marking CSS styles, isn't it?
John
--
Arthur Kalmenson
--
--
Arthur Kalmenson
Arthur, thanks. Someplace I saw some debate about whether UI Binder
was worthwhile. Now I see why it's in dispute.
Ahhhh, I finally got it. I wish I hadn't wasted so much time reading
tutorials and other "helpful" guides. The real scoop is right here:
--
Arthur Kalmenson