Como eu colocaria acima, o atributo “linhaVermelha”, para depois chamar la embaixo, desculpa se estou viajando.
andreiribas
resumindo tudo:
<style>
.linhaVermelha
background-color:red;
}
</style><trclass='<%temp.getString("Responsavel_Digitacao").equals("MARIO DO NASCIMENTO DIAS")?"linhaVermelha":""%>'><td><%out.print(temp.getString("Responsavel_Digitacao"));%></td></tr><tr><td><%out.print(temp.getString("TecnicoResponsa"));%></td></tr>
maniacs
.linhaVermelha{
background-color:red;
}
Javafull
Galera fiz dessa maneira e esta retornando o seguinte erro:
C:\Documents and Settings\BR0095211797\TESTE\build\generated\src\org\apache\jsp\lista_005ffinal03_jsp.java:198: not a statement temp.getString(“Responsavel_Digitacao”).equals(“MARIO DO NASCIMENTO DIAS”) ?“linhaVermelha”:""
C:\Documents and Settings\BR0095211797\TESTE\build\generated\src\org\apache\jsp\lista_005ffinal03_jsp.java:198: ‘;’ expected temp.getString(“Responsavel_Digitacao”).equals(“MARIO DO NASCIMENTO DIAS”) ?“linhaVermelha”:""
2 errors
C:\Documents and Settings\BR0095211797\TESTE\nbproject\build-impl.xml:372: The following error occurred while executing this line:
C:\Documents and Settings\BR0095211797\TESTE\nbproject\build-impl.xml:364: The following error occurred while executing this line:
C:\Documents and Settings\BR0095211797\TESTE\nbproject\build-impl.xml:149: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
andreiribas
tenta ai:
<%=temp.getString("Responsavel_Digitacao").equals("MARIO DO NASCIMENTO DIAS")?"linhaVermelha":"linha";%>
mas ja avisando:
scriptlets é a pior forma possível de você fazer isso.
da uma estudada em jstl pra melhorar o codigo