Tuesday, January 31, 2012

Multiple constructors with UiBinder


How do I define a class with more than one constructor to be use with
UiBinder? @UiConstructor it's not allowed to be put in more than one
constructor :S

For example... if my class is the following... How can I tell to
Uibinder that I have 4 constructors?

public class MyButton extends Button {
public MyButton(String title, ButtonType buttonType) {...}
public MyButton(Sring title, ButtonType buttonType, boolean
orientation) { ....}
public MyButton(String title, ButtonType buttonType, String imageUrl,
String imagePressedUrl, boolean orientation) {...}

public @UiConstructor
MyButton(String title) {...}

Thank you

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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment