I have a class UIPopup which is coded with UIBinder.
public class UIPopup
extends DecoratedPopupPanel
{
private static PopupUiBinder uiBinder =
GWT.create(PopupUiBinder.class);
interface PopupUiBinder
extends UiBinder{}
@UiFactory
public UIPopup getThis(){
return this;
}
.
.
}
Then I extended UIPopup and called the class PopupWin.
public class PopupWin
extends UIPopup
{
public PopupWin(MaineWin maine){
this.maine = maine;
}
final public MaineWin maine;
}
However, GWT compilation complained of errors:
PopupWin has no default (zero args) constructor. To fix this, you can
define a @UiFactory method on the UiBinder's owner, or annotate a
constructor of PopupFrame with @UiConstructor.
There are two possibilities to my getting the error:
1. There is a mistake in my code.
2. Any class extended from UIBinder must provide a zero arg
constructor.
3. There is an undocumented UIBinder directive/annotation that can be
used to instruct that UIBinder features should not be passed on to
subclasses.
I believe the case is due to possibility #2.
If so, this is bad design on part of GWT architects.
Because a programmer using my widget library should be blind to
whether is was built using UIBinder or plain old java source coding.
There also are valid reasons when I deliberately do not want the user
of the library to have access to a zero arg constructor.
Either way it is wrong and bad practice to have the user of my library
to expect to be constrained by UIBinder.
I would like to know if the error is due to case #1, #2 or #3.
If case #2, I request such bad design policy be corrected.
If case #3, does the GWT team need my help in writing the
documentation. I am willing to donate my time because it is bad if GWT
(and other Google products) features seem to follow the early days of
Microsoft's practice of undocumented features, and you have to ask for
them in forums or insiders.
--
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.