manolo / gwt-polymer-elements

Polymer Web Components for GWT. A collection of Material Design widgets for desktop and mobile.
Apache License 2.0
155 stars 49 forks source link

Auto generated functions do not work #101

Closed steffimueller closed 7 years ago

steffimueller commented 8 years ago

I use the latest released version 1.2.3 and tried the widget API. It compiles fine with GWT2-8-SNAPSHOT and Java8 but when I try:

@UiField
PaperBadge onlineState;

... 
onlineState.setLabel("on");
onlineState.addStyleName("on");

None of these functions work.

confile commented 8 years ago

+1 I have the same issue. I tried it with different elements none of the functions work.

manolo commented 8 years ago

Does it happen only for this component and these methods ?

steffimueller commented 8 years ago

No it happens for all components I have tried.

confile commented 8 years ago

Me too. None of the methods of the Components is working.

manolo commented 8 years ago

are those methods called in the constructor? could you paste the full code of your .ui.xml and .java ?

confile commented 8 years ago

ui.xml

.java

confile commented 8 years ago

@manolo Do you have any idea what is wrong?

ghost commented 8 years ago

+1 That happens for me too.

confile commented 8 years ago

I created a demo project to show the problem here:

https://github.com/confile/vaadin-polymer-test

jllodra commented 8 years ago

+1 same problem here.

aadhaarm commented 7 years ago

+1

manolo commented 7 years ago

I have tested this case in one project and works as expected, take a look to these lines:

https://github.com/manolo/gwt-polymer-chat-app/blob/master/src/main/java/org/gwtcon/client/Main.ui.xml#L40

https://github.com/manolo/gwt-polymer-chat-app/blob/master/src/main/java/org/gwtcon/client/Main.java#L53

https://github.com/manolo/gwt-polymer-chat-app/blob/master/src/main/java/org/gwtcon/client/Main.java#L129

aadhaarm commented 7 years ago

Yes I too finally used a 'PaperBadgeElement' instead of 'PaperBadge' in ui:binder file and it works correctly. Thanks.

manolo commented 7 years ago

with 1.7.0.0-SNAPSHOT both should work, latest version had a problem on setting properties vs attributes

manolo commented 7 years ago

Fixed in 1.7.0.0