gwt-material
gwt-material copied to clipboard
Waves does not work properly in 2.0.1
when I add waves in my UI xml Material button it does not work when I run my app and it destroys some of my UI element. It throws undefined error in browser console. It only works when I declare it in my java code.
What browser are you using? Can you confirm this in 2.1? Can you give us the exact UiBinder code you are using? The demo app was setup using UiBinder but can't reproduce your issue. Maybe share with us your config in your button on how you declare the waves property
I use both google chrome and mozilla firefox. I did not try it yet in 2.1.
here is my code:
<m:MaterialRow backgroundColor="WHITE" addStyleNames="{style.login}"> <m:MaterialColumn grid="s12 m8 l4" offset="m2 l4"> <m:MaterialPanel shadow="1" addStyleNames="{style.fieldPanel}"> <m:MaterialLabel text="PI Manager" fontSize="26px" textColor="DEEP_PURPLE" padding="5" addStyleNames="{style.centerPosition}"/> <m:MaterialTextBox ui:field="username" iconType="ACCOUNT_CIRCLE" type="TEXT" label="Username"/> <m:MaterialTextBox ui:field="password" iconType="LOCK" type="PASSWORD" label="Password" /> <m:MaterialContainer textAlign="CENTER"> <m:MaterialButton ui:field="btnLogin" text="Log In" waves="LIGHT" textColor="WHITE" size="MEDIUM" backgroundColor="DEEP_PURPLE_DARKEN_4" addStyleNames="{style.centerPosition}"/> </m:MaterialContainer> </m:MaterialPanel> </m:MaterialColumn> </m:MaterialRow>
Can you share with the the styles on each defined in the UiBinder
I tested the code above and it works fine then.
here is my declared style:
.fieldPanel{ margin-Top: 30% !important; background: white; padding: 6%; } .login{ padding: 0%; } .centerPosition{ text-align: center; }
here is the error in browser console:
Error: com.google.gwt.user.client.ui.AttachDetachException: Exception caught: Exception caught: Exception caught: Exception caught: Exception caught: Exception caught: (TypeError) : $wnd.Waves is undefined
I'm using GWT2.8.2
It seems that the jquery is not loaded in your app.
here is my main gwt.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
<module>
<inherits name="com.google.gwt.user.User"/>
`<!-- Inherit the default GWT style sheet. You can change -->`
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name="com.google.gwt.user.theme.chrome.Chrome"/> -->
<!-- <inherits name="com.google.gwt.user.theme.dark.Dark"/> -->
<entry-point class="com.icomm.client.PIManagerMainEntryPoint"/>
`<!--GWT Material-->`
`<inherits name="gwt.material.design.GwtMaterialWithJQuery"/>`
`<inherits name="gwt.material.design.jquery.JQuery"/>`
`<inherits name="gwt.material.design.themes.ThemePurple"/>`
`<inherits name="gwt.material.design.addins.GwtMaterialAddins"/>`
`<inherits name="gwt.material.design.GwtMaterialTable"/>`
`<source path='client'/>`
`<source path='shared'/>`
`<set-configuration-property name="CssResource.enableGss" value="true"/>`
`<!--<set-configuration-property name="CssResource.legacy" value="true"/>-->`
`<set-configuration-property name="CssResource.conversionMode" value="lenient"/>`
`<!-- Do not define servlets here, use web.xml -->`
</module>
now both in java code and in UI Binder are not working.