gwt-material icon indicating copy to clipboard operation
gwt-material copied to clipboard

Waves does not work properly in 2.0.1

Open ManOfGod opened this issue 6 years ago • 10 comments

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.

ManOfGod avatar Jul 25 '18 07:07 ManOfGod

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

kevzlou7979 avatar Jul 25 '18 07:07 kevzlou7979

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>

ManOfGod avatar Jul 25 '18 07:07 ManOfGod

Can you share with the the styles on each defined in the UiBinder

kevzlou7979 avatar Jul 25 '18 07:07 kevzlou7979

I tested the code above and it works fine then.

kevzlou7979 avatar Jul 25 '18 07:07 kevzlou7979

here is my declared style: .fieldPanel{ margin-Top: 30% !important; background: white; padding: 6%; } .login{ padding: 0%; } .centerPosition{ text-align: center; }

ManOfGod avatar Jul 25 '18 08:07 ManOfGod

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

ManOfGod avatar Jul 25 '18 08:07 ManOfGod

I'm using GWT2.8.2

ManOfGod avatar Jul 25 '18 08:07 ManOfGod

It seems that the jquery is not loaded in your app.

kevzlou7979 avatar Jul 25 '18 10:07 kevzlou7979

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>

ManOfGod avatar Jul 26 '18 02:07 ManOfGod

now both in java code and in UI Binder are not working.

ManOfGod avatar Jul 26 '18 06:07 ManOfGod