Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend GWT functionality #45

Open
anton-johansson opened this issue Jul 14, 2015 · 2 comments
Open

Extend GWT functionality #45

anton-johansson opened this issue Jul 14, 2015 · 2 comments

Comments

@anton-johansson
Copy link

Hi!

This project looks interesting! But like other Material Design/Polymer GWT wrappers I've seen, some of the widgets lack GWT functionality. Take a look at GWT's built in TextBox for example. It implements a bunch of interfaces, for example:

  • HasChangeHandlers
  • HasText
  • HasValue<String>
  • IsEditor<ValueBoxEditor<String>
  • etc

PaperInput does not implement these interfaces. This makes it harder to work with the widget. For example, if you use a framework such as tessell, it's crucial to implement these interfaces, in order to do proper 2-way bindings.

Are there any plans regarding this?

Thanks!

@manolo
Copy link
Owner

manolo commented Jul 14, 2015

Actually we have not thought on that.
We have the mechanism to implement customised behaviours per element, but first we have to consider if there is interest on certain features. Could you enumerate which interfaces would be fundamental for you and in which web components?.
Anyway those customisations only can be perform in Widgets, not Elements.

@anton-johansson
Copy link
Author

Well, I would like to see most of the native interfaces being implemented. But there are of course some that are more important than others. If we take TextBox again, for example, the most important ones would be HasValue<String>, HasEnabled and HasChangeHandlers, I think. The value and the enabled status are things that you would most likely bind to a model.

If people would like to use the new GWT Editor framework, I assume the widget would have to implement IsEditor<ValueBoxEditor<String>> as well.

If we look at CheckBox, we would again need the most vital ones, HasValue<Boolean>, HasEnabled and IsEditor<LeafValueEditor<Boolean>> for editors.

But if you take a look at the GWT native class, FocusWidget, that many widgets extend, you will see a lot of interfaces that are very useful.

These are just ideas, it's much easier to use the widgets if they work like regular GWT widgets.

About it only working on Widgets, yeah, that might be the case. I'm not very familiar of using Elements directly, as mentioned in the "Element vs Widget API" section of the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants