Hi All! This is my first post, so i hope this are the right place to
post :)
Recently I'm started to see the UiBinder feature that GWT 2.1
introduced, but while reading the documentation a doub about the
useage or implementation appeared. I understand the concept of
UiBinding and the declarative UI definition and the owned class
corresponding to the xml file. I know that to perform the mapping of
diferent fields, the createAndBindUi method must be call but in this
point is where the doub attack me.
In some sniped of code, the documentation defines this:
public class HelloViewImpl extends Composite implements HelloView {
private static HelloViewImplUiBinder uiBinder = GWT
.create(HelloViewImplUiBinder.class);
interface HelloViewImplUiBinder extends UiBinder {
}
public HelloViewImpl() {
initWidget(uiBinder.createAndBindUi(this));
}
...
.....
....
}
I don't really undestand what is the purpose of the
HelloViewImplUiBinder, there is no another usage of that interface in
the rest of the code, this is the only place where is used. Seems like
the HelloViewImplUiBinder is only used to create a instance of a
UiBinder to call the createAndBindUi method, so my question is if I
can avoid the declaration of that interface and replace the line:
private static HelloViewImplUiBinder uiBinder =
GWT.create(HelloViewImplUiBinder.class);
with
private static UiBinder uiBinder = GWT.create(UiBinder.class);
and then call the createAndBindUi() method?
I appreciated any help or comment about the issue, thanks!
--
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.