vaadin - Using font icons with declarative UIs -


while developing new application vaadin 7.4.6, found myself needing supply icons various buttons. i'd doing dashboardbutton.seticon(fontawesome.bar_chart_o); i'm trying declaratively.

now, can achieve similar effect if include span inside button definition below...

<v-button _id="dashboardbutton" primary-style-name="valo-menu-item" style-name="borderless">     <span class="v-icon fontawesome">&#xf080</span>     dashboard </v-button> 

... , know books mentions mapping objects attributes not supported (at least far), wondering if knows better alternative or if there's way of using font-icons enums instead of code points, eg: fontawesome.bar_chart_o instead of &#xf080.

the following works (at least in v7.5.0 , valo).

<v-button icon="fonticon://fontawesome/f0c7">save</v-button> 

you still have use hex code it's little more elegant example. it's eclipse wysiwyg vaadin designer uses.


later edit: detailed guide creating , using custom font icons vaadin


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -