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

Navbar problem

Open rodrigobastosv opened this issue 8 years ago • 16 comments

I can't make the MaterialNavBar example work (https://gwtmaterialdesign.github.io/gwt-material-demo/#navbar).

I'm getting the "cannot read property 'displayEffect' of undefined" error while trying to use material navbar.

The code i used is copied from here: https://gwtmaterialdesign.github.io/gwt-material-demo/#navbar

<g:HTMLPanel> <m:MaterialHeader> <m:MaterialNavBar> <m:MaterialNavBrand href="#Test" float="LEFT" text="App Title"/> <m:MaterialNavSection float="RIGHT"> <m:MaterialLink iconType="ACCOUNT_CIRCLE" iconPosition="LEFT" text="Account" textColor="WHITE" waves="LIGHT"/> <m:MaterialLink iconType="AUTORENEW" iconPosition="LEFT" text="Refresh" textColor="WHITE" waves="LIGHT"/> <m:MaterialTooltip text="Menu"> <m:MaterialLink iconType="SEARCH" textColor="WHITE" waves="LIGHT"/> </m:MaterialTooltip> <m:MaterialTooltip text="Starter"> <m:MaterialLink iconType="MORE_VERT" textColor="WHITE" waves="LIGHT"/> </m:MaterialTooltip> </m:MaterialNavSection> </m:MaterialNavBar> </m:MaterialHeader> </g:HTMLPanel>

Saw somewhere that: "The navbar is intended to be hidden on FLoat types" but i dont know how to do it

rodrigobastosv avatar Dec 02 '17 19:12 rodrigobastosv

You're code is correct. Can you show me your module.gwt.xml on how you import the GMD Modules.

kevzlou7979 avatar Dec 03 '17 06:12 kevzlou7979

Sure

<!--GWT Material-->
<inherits name="gwt.material.design.GwtMaterialDesign"/>

<!--     
<inherits name="gwt.material.design.themes.ThemeBlue"/>
<inherits name="gwt.material.design.addins.GwtMaterialAddinsDebug"/>
 -->
<inherits name="gwt.material.design.GwtMaterialTableDebug"/>

Thanks for the reply

rodrigobastosv avatar Dec 03 '17 06:12 rodrigobastosv

OK so you need to import

 <inherits name="gwt.material.design.GwtMaterialWithJQuery"/>

instead of 
<inherits name="gwt.material.design.GwtMaterialDesign"/> 

because displayEffect needs JQuery

kevzlou7979 avatar Dec 03 '17 06:12 kevzlou7979

Ok, that's a start.

Now i'm getting [ERROR] Unable to find 'gwt/material/design/GwtMaterialDesignWithJQuery.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

rodrigobastosv avatar Dec 03 '17 07:12 rodrigobastosv

After hours i've figured that i was puting <inherits name="gwt.material.design.GwtMaterialDesignWithJQuery"/> instead of <inherits name="gwt.material.design.GwtMaterialWithJQuery"/>

But after changing i got the same error. The error is bellow if helps in anything.

error

Thank you

rodrigobastosv avatar Dec 03 '17 10:12 rodrigobastosv

I'm having the exact same problem mentioned here

raphaelbn avatar Dec 04 '17 11:12 raphaelbn

BTW i'm using Gwt-material in a GWT project, not a GWTP one. Don't know if that's relevant info.

rodrigobastosv avatar Dec 04 '17 14:12 rodrigobastosv

Any suggestions ? Have the same issues

chrishilgemann avatar Feb 24 '18 22:02 chrishilgemann

@chrishilgemann turns out that a lot of js files where not loadiing for some reason. What i did was putting all the necessary js code in a file and importing in my app.html file.

That isn't the cleaner solution but it did the work for me

rodrigobastosv avatar Feb 25 '18 16:02 rodrigobastosv

@rodrigobastosv do you happen to remember which files you had to manually import?

rodrigoborgesdeoliveira avatar Feb 27 '19 15:02 rodrigoborgesdeoliveira

Hi @rodrigoborgesdeoliveira i don't really remember.

What version of GMD are you using? When i updated to GMD 2.1.1 this problem was solved and i took the files away.

Let me know if it works and if not i can't take some time to look for the files here

rodrigobastosv avatar Feb 27 '19 16:02 rodrigobastosv

Hmm, that's exactly the version I'm using. But no problem then. I'll see what I can find.

rodrigoborgesdeoliveira avatar Feb 27 '19 16:02 rodrigoborgesdeoliveira

Hey @rodrigoborgesdeoliveira i found the file.

Send me an email so i can send to you the file

rodrigobastosv avatar Feb 27 '19 18:02 rodrigobastosv

Thank you, @rodrigobastosv. I don't know where to find your e-mail, can you send to [email protected]?

rodrigoborgesdeoliveira avatar Feb 27 '19 19:02 rodrigoborgesdeoliveira

Sure. I just shared with you

rodrigobastosv avatar Feb 27 '19 19:02 rodrigobastosv

Thank you very much!

rodrigoborgesdeoliveira avatar Feb 27 '19 19:02 rodrigoborgesdeoliveira