Maybe its possible (you have to write custom UiBinder generators) but at
some point you will need a mapping between your template field name
"additionalData" and the java field name "ownerAge".
How would you define that mapping? For me it doesn't feel right to possibly
have a third file with that mapping just for nice variable names. So the
easiest way I can think of would be something like:
@UiField(name = "additionalData") Label ownerAge;
If its possible to extend GWT's UiBinder generators in a clever way you
should be able to implement such a name variable for the @UiField
annotation. Otherwise you have to copy and paste lots of GWT source code and
change it to your needs. You can also create an issue in GWT's bug tracker
to request that feature. Maybe they like the idea.
But I think I would go with JavaDoc and possibly a getter with a meaningful
name and only use the getter:
/**
* Provides the owners age
*/
@UiField Label additionalData
private Label getOwnerAge() { return additionalData };
-- J.
--
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.