Whenever I try to explore to possibilities with the new UiBinder,
Eclipse tells me that e.g.:
"Field button has no corresponding field in template file
Mail.ui.xml".
Even when I use the Eclipse Wizard "New UiBinder" the web app wont
build or run in dev-mode.
I have tried to import the Mail sample into Eclipse - no problem. But
when I try to add a new UiField, I get the error again.
It's probably a very fundamental error - and I apologize for any
inconvenience this post may cause - but I give it a try anyway.
Here's the wizard generated file Pjat
public class Pjat extends Composite {
private static PjatUiBinder uiBinder = GWT.create
(PjatUiBinder.class);
interface PjatUiBinder extends UiBinder<Widget, Pjat> {}
@UiField Button button; // <-- This line gets a red underline
public Pjat(String firstName) {
initWidget(uiBinder.createAndBindUi(this));
button.setText(firstName);
}
@UiHandler("button") // <-- This line gets a red underline
void onClick(ClickEvent e) {
Window.alert("Hello!");
}
}
<!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>
.important {font-weight: bold;}
</ui:style>
<g:HTMLPanel>
Hello,
<g:Button styleName="{style.important}" ui:field="button" />
</g:HTMLPanel>
</ui:UiBinder>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.