Custom PolymerWidget : GWT 2.8 and GWT Polymer Elements 1.7.0

81 views
Skip to first unread message

GAURAV GUPTA

unread,
Nov 28, 2016, 9:21:26 AM11/28/16
to Polymer
Can you please help me creating my custom widget using GWT 2.8 and GWT Polymer Elements 1.7.0.
wanted to create custom my custom element i.e. html file. now Can I use this custom element to create GWT Widget, Similar to what vaadin does:

public class PaperCheckbox extends PolymerWidget {
    /**
     * Default Constructor.
     */
    public PaperCheckbox() {
       this("");
    }
.........
......
}

we have paper-checkbox.html in bower_component.

Now I have my own : custom-element.html Now how I can create widget out of it:
As I need to register my custom element, I am not sure how that will be done.

Thanks,
Gaurav


Manolo Carrasco Moñino

unread,
Nov 29, 2016, 7:30:28 AM11/29/16
to Polymer
You need to run the gwt-api-generator in order to produce  java classes of your component..
The generator inspects all web components that you install in your bower_components folder.

Are you using maven to compile your project?

If so, you should read this section https://github.com/vaadin/gwt-api-generator#using-your-own-web-components-in-your-app  to automatically setup node, npm,  bower, and run gwt-generator in maven.


- Manolo

GAURAV GUPTA

unread,
Dec 14, 2016, 3:44:17 AM12/14/16
to Polymer
Thanks for response Manolo, I am not using maven, we do not have setup for node.js. can you please give me example where I can manually generate equivalent java classes of my custom web components.

Regards,
Gaurav
Reply all
Reply to author
Forward
0 new messages