[AIDE] <% IF dans une JSP
Bonjour,
dans ma jsp j'ai un block que je dois afficher suivant une valeur
Code:
1 2 3 4 5 6 7 8
|
<label for="agence">Agence :</label>
<nested:select name="EditPrestaBean" property="prestation.agence.idAgence" styleId="agence" styleClass="active"
onfocus="this.style.background='#FFF8D9'; this.style.color='#000000'"
onblur="this.style.background='#F0F1FA'; this.style.color='#8e8e8e'" >
<html:option value="0">Non renseigné</html:option>
<html:optionsCollection name="EditPrestaBean" property="agences" value="idAgence" label="code"/>
</nested:select> |
la valeur se trouve dans mon Bean et je voulais savoir si l'on peut utiliser un IF dans la jsp
Exemple
Code:
1 2 3 4 5 6 7 8 9 10
|
<% If(Monobjet.getMaValeur = Objet.Valeur) { %>
<label for="agence">Agence :</label>
<nested:select name="EditPrestaBean" property="prestation.agence.idAgence" styleId="agence" styleClass="active"
onfocus="this.style.background='#FFF8D9'; this.style.color='#000000'"
onblur="this.style.background='#F0F1FA'; this.style.color='#8e8e8e'" >
<html:option value="0">Non renseigné</html:option>
<html:optionsCollection name="EditPrestaBean" property="agences" value="idAgence" label="code"/>
</nested:select>
<% } %> |