djd
unread,Nov 23, 2009, 9:25:16 AM11/23/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
Hi,
I have discovered that UiBinderGenerator has a (quite) strange
behavior while setting/adding Css styles.
Here is an example:
<ui:UiBinder
xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui' >
<ui:style type="com.app.client.LogoDisplay.MyStyle"
src="LogoDisplay.css" />
<g:VerticalPanel styleName="{style.basic}"
addStyleNames="{style.common}"/>
</ui:UiBinder>
In LogoDisplay.css I obviously have the two styles (.basic
and .common). I also declared a custom CssResource (in LogoDisplay)
that binds with that Css file. The weird thing is styleName is
actually invoked using a setter (setStyleName) while addStyleNames are
invoked repeteadly using addStyleName, so it virtually same thing, but
the last style is not added (.common). I have also tried to use
addStyleNames="common" but it seems that I don't have the Css file
injected (and I would need to manually do that) and this does not work
either.
Can you help me? I'm sorry if the answer is extremely trivial, but I
was unable to find a solution for this problem (adding 2 or more
styles on a widget) - preferably I don't want to inject the Css (I
plan to have a lot of Css files, I don't want to inject all of them).