- I am using Vaadin 13.08
- I have downloaded Fontawesome files in “webapp/frontend/font-awesome” folder.
- I have a file “common.css” in the “webapp/css” folder that has this code for referencing fontawesome downloads
<!-- Remember to import custom-style, which is included in the Polymer package -->
<link rel="import"
href="../bower_components/polymer/lib/elements/custom-style.html">
<!-- Font Awesome -->
<link href="../font-awesome/css/all.css" rel="stylesheet"> <!--load all styles -->
<custom-style>
<style>
.edu-login{
........
- I have a class that represents a page with this annotation
@HtmlImport("css/common.css")
and I add to a VerticalLaout component this code that represents an icon from fontawesome
myVerticalLayout.add(new Html(""<span class=\"fas fa-camera\"></span>"));
and works.
- Now I want to add a TemplateRenderer of a ComboBox (in this page) with a code like this:
combo.setRenderer(
TemplateRenderer
.<Person>of("<span class=\"fas fa-camera\"></span> [[item.name]
]")
.withProperty("name", Person::getName));
But the icon is not showed.
It seems that the fontawesome downloaded files are not visible to the template renderer.
Any help?
Thanks