I'm trying to build a gwt website with UIBinder. It's cool, it works, but i have a problem with ui:style.
My project is mavenized (i use the gwt-maven-plugin archetype).
The Application.html and Application.css files are in src/main/resources/com/foo/bar/public.
The page i'm trying to style is in src/main/java/com/foo/bar/client/ Page1.java and Page1.ui.xml.
I can use a css file if it is in the same package with :
<ui:style src="Page1.css" />
But i'd like to target the Application.css (so i could avoid having the same styles in each css file in each package)
I tried different relative paths, and the Application.css is never found.
Is there someone, out there, who had the same problem, and would care to help me ?
Thanks !
Introduction. The UiBinder is a framework designed to separate Functionality and View of User Interface. The UiBinder framework allows developers to build gwt applications as HTML pages with GWT widgets configured throughout them.
addStyleName("gwt-Red-Text"); Using above method you can add as many styles as you like to apply on a widget. If you remove first style from the button widget then second style will still remain with the text.
If your application css is referenced elsewhere in a ClientBundle you can use and avoid your path problems altogether. See Using an external resource.
Old question, but; I simply referenced a global style like this, without the ui:style directive:
g:TabPanel ui:field="tabPanel" width="100%" height="90%" styleName="nameInMyMainCss"
This is equivalent to calling setStyleName("nameInMyMainCss"); in the matching java class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With