gwt-polymer-elements
gwt-polymer-elements copied to clipboard
Error when trying out GWT&Polymer example
When going through the example in the GWTProject page, I get the following error in the step where the ripple effect is added. The UI works as expected up until that point.
Error message in Chrome DevTools (screenshot attached)
this.get_clientBundleFieldNameUnlikelyToCollideWithUserSpecifiedFieldOkay_0_g$(...).style_3_g$ is not a function
Also in the screenshot is the Refused to get unsafe header "Location"
error.
I am using GWT-2.8.1 with vaadin-gwt-polymer-elements-1.9.3.1.
In my app html file I have this in the head tags `
`
I am importing the webcomponents as follows ` List<String> alCollections = new ArrayList<String>(); alCollections.add("iron-icons/iron-icons.html"); alCollections.add("paper-ripple/paper-ripple.html"); Polymer.importHref(alCollections, new Function<Object, Object>() {
@Override
public Object call(Object arg) {
GWT.log("import succeeded");
startApplication();
return null;
}
},
new Function<Void, Void>() {
@Override
public Void call(Void arg) {
GWT.log("import failed");
return null;
}
});
}
`
Main.java ` public class Main extends Composite {
interface MainUiBinder extends UiBinder<HTMLPanel, Main> {}
private static MainUiBinder ourUiBinder = GWT.create(MainUiBinder.class);
public Main() {
initWidget(ourUiBinder.createAndBindUi(this));
}
}`
Main.ui.xml ` <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:p='urn:import:com.vaadin.polymer.paper.widget' xmlns:i='urn:import:com.vaadin.polymer.iron.widget'>
<ui:style>
paper-icon-item {
position: relative;
overflow: hidden;
}
</ui:style>
<g:HTMLPanel>
<p:PaperIconItem ui:field="menuClearAll">
<i:IronIcon icon="delete" attributes="item-icon"/>
<div>Clear All</div>
<p:PaperRipple/>
</p:PaperIconItem>
<p:PaperIconItem ui:field="menuClearDone">
<i:IronIcon icon="clear" attributes="item-icon"/>
<div>Clear Done</div>
<p:PaperRipple/>
</p:PaperIconItem>
<p:PaperIconItem ui:field="menuSettings">
<i:IronIcon icon="settings" attributes="item-icon"/>
<div>Settings</div>
<p:PaperRipple/>
</p:PaperIconItem>
<p:PaperIconItem ui:field="menuAbout">
<i:IronIcon icon="help" attributes="item-icon"/>
<div>About</div>
<p:PaperRipple/>
</p:PaperIconItem>
</g:HTMLPanel>
</ui:UiBinder>
`
Removing the <ui:style>
section in the Main.ui.xml
file fixed the problem of the page not rendering.
The 'Refused to get unsafe header "Location"' error is still there.