0
Given my datatable below:
<p:dataTable id="tabela" var="linha" value="#{naturemb.lista}" paginator="true" rows="10" rendered="#{not empty naturemb.lista}" >
<p:column styleClass="botoesGrid">
<p:commandButton icon="ui-icon-pencil" action="#{naturemb.editar(linha.id)}" process="@this" update="cadastro,pesquisa" ajax="false"/>
<p:commandButton icon="ui-icon-trash" action="#{naturemb.excluir(linha)}" ajax="true" process="@this">
<p:confirm header="#{msg['cabecalho.apagar.registro']}" message="#{msg['apagar.registro']}" icon="ui-icon-alert"/>
</p:commandButton>
<p:confirmDialog global="true" showEffect="exploud" hideEffect="fade">
<p:commandButton value="Sim" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check"/>
<p:commandButton value="Não" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
</p:column>
<p:column headerText="#{msg['nome']}" sortBy="#{linha.nome}" style="width:12%;">
<h:outputText value="#{linha.nome}" />
</p:column>
I am creating a method so that if within the lines there are some specific words, they will have different formatting. As I call the method that will make this check on <h:outputText
? Or is it not in him that I call the method?
Show, I’ll test and let you know if it worked. But what do the foo and the bar mean?
– Roknauta
any other variable you want to inform, as if it were x and y in mathematics, but note that the check is done and returned based on the subclass of css, for example: checks if the value contains Atack and returns Atack which in turn is a subclass of css. So if you want to include say "defense" you would have to add the subclass . base . defense{ color: black ! Important; } and on the Beam include checking the same private 1º create the attribute Static final String DEFENSE = "defense"; 2º add the Else if for defense.
– David Cabral
Show, I must test today and talk to you. Thank you very much.
– Roknauta
Show, it worked, thank you very much.
– Roknauta