Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to addStyleNames "Multiple css classes" into 1 element in UiBinder in GWT?

I have the need to apply many separated CSS classes into 1 element in UiBinder in GWT, but don't know how to do it.

In my TestView.ui.xml, i have

<g:Button  text="Log Out"  ui:field="logoutButton" addStyleNames="{style.gwt-Button}" addStyleNames="{style.paddedRight}" />

but it generated run-time error.

Then I tried

<g:Button  text="Log Out"  ui:field="logoutButton" addStyleNames="{style.gwt-Button style.paddedRight}" />

This time I got compile time error.

So, How to addStyleNames "Multiple css classes" into 1 element in UiBinder in GWT?

No info found on internet.

like image 285
Tum Avatar asked Sep 19 '13 04:09

Tum


1 Answers

I Think you have to specify each style name in addStyleNames property in a separate bracket pair.

Something like this:

<g:Button  text="Log Out"  ui:field="logoutButton" addStyleNames="{style.gwt-Button} {style.paddedRight}" />
like image 117
zaerymoghaddam Avatar answered Nov 14 '22 23:11

zaerymoghaddam