Page 1 of 1

<p:commandButton> do not load icon using rendered attributes

Posted: 13 Jul 2015, 19:06
by kenhiti
I'm with the following problem when using this code:

Code: Select all

<p:column headerText="Ações" style="text-align: center" width="200px">
					<p:button outcome="/Motorista/CadastroMotorista" icon="fa fa-edit White" title="Editar">
						<f:param name="motorista" value="#{motorista.idMotoristaCliente}"/>
					</p:button>
					
					<p:commandButton icon="fa fa-key White" title="Redefinir senha" action="#{pesquisaMotoristaBean.resetarSenha}" />
					
					<p:commandButton icon="fa fa-unlocked White" title="Ativar motorista" rendered="#{motorista.registroAtivo == 'N'}" 
					action="#{pesquisaMotoristaBean.ativarMotorista(motorista.idMotoristaCliente)}" update="@form" process="@this"/>
										
					<p:commandButton icon="fa fa-locked White" title="Desativar motorista"  rendered="#{motorista.registroAtivo == 'S'}" 
					action="#{pesquisaMotoristaBean.inativarMotorista(motorista.idMotoristaCliente)}" update="@form" process="@this" />
					
					<p:button icon="fa fa-cart-plus White"  title="Autorização de vale motorista" />					
					
				</p:column>
What happens to not load the icon???

Re: <p:commandButton> do not load icon using rendered attrib

Posted: 14 Jul 2015, 09:38
by mert.sincan
I couldn't replicated the issue on Rio. Can you please attach a screenshot and test.xhtml?

Also, please try after adding this param to web.xml;
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>

Re: <p:commandButton> do not load icon using rendered attrib

Posted: 16 Jul 2015, 00:23
by kenhiti
Thank you, problem solved.

Re: <p:commandButton> do not load icon using rendered attrib

Posted: 17 Jul 2015, 07:00
by mert.sincan
Glad to hear, thanks!