Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Icones não aparecem no menuitem. ( usando versão 6 do primefaces )

<h:form rendered="#{usuarioLogado != null}">
              <p:menuButton value="Menu">
                <p:menuitem value="Livros" action="livro?faces-redirect=true" icon="fa fa-fw fa-edit" />
                <p:menuitem value="Autores" action="autor?faces-redirect=true" icon="fa fa-fw fa-edit" />
                <p:separator />
                <p:menuitem value="Logout" action="#{loginBean.deslogar}"  icon="fa-sign-out" />
              </p:menuButton>
            </h:form>
3 respostas

Fala ai Paulo, de boa?

Seu icone tá certo ali ?

é isso mesmo : fa fa-fw fa-edit ?

solução!

Olhando pela documentação :

https://www.primefaces.org/showcase/ui/menu/menuButton.xhtml

Me desculpe. Falha minha. Faltou a seguinte configuração:

In your web.xml add:

<context-param>
    <param-name>primefaces.FONT_AWESOME</param-name>
    <param-value>true</param-value>
</context-param>
In your *.xhtml where you would like to add FontAwesome icons, in between head tags point to the font-awesome css of the JAR that you have:

<h:outputStylesheet name="webjars/font-awesome/4.4.0/css/font-awesome.css">
Finally reference icons correctly e.g.

<p:button outcome="add-user-form" value="Add User" icon="fa fa-user-plus">
     <f:param name="productId" value="10" />
</p:button>

`

fonte: https://stackoverflow.com/questions/21052851/fontawesome-with-primefaces

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software