1

The icon property of Button tag adds a font-awesome FOLDER icon to the Button. Is it possible to add stacked icons to the button? For, the new folder I need to stack FOLDER and PLUS icon and add it to button?

<b:Button addStyleNames="pull-right {style.new-folder}"
                        type="SUCCESS" ui:field="createDataRoom" icon="FOLDER"></b:Button>
Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
Forkmohit
  • 733
  • 3
  • 12
  • 31

1 Answers1

-1

Are you sure this even compiles ?

Unless your Button is a custom class from your project, most of these fields don't exist for the GWT Button, including Icon. And it's not addStyleNames, but simply "styleName"

Are you sure it's not one of your colleague who made a custom button class ?

To come back to your problem, as you can see in the example page of Font Awesome, you stack up the icons by adding several class to the HTML tag.

So in your case, you'd need to stack them in "styleName" (which is the field for adding one or more CSS class)

With a normal GWT button, the code would look like this

<ui:UiBinder xmlns:g='urn:import:com.google.gwt.user.client.ui'>

<g:Button
        ui:field="createDataRoomButton"
        styleName="fa-stack fa-lg">

Notice the space between fa-stack and fa-lg. Those are two different classes.

wsalame
  • 130
  • 1
  • 8
  • "most of these fields don't exist for the GWT Button" . It's GWTbootstrap3 button. Are you updated on gwtbootstrap3? – Forkmohit Oct 26 '15 at 04:58