0

I want to disabled a commandLink with this condition: <p:commandLink id="buttonchoix" value="choisir" disabled="#{editCommandController.result < car.stock}" />

but it generated for me this error (in French):

Error Parsing /vues_admin/editCommand.xhtml: Error Traced[line: 88] La valeur de l'attribut "disabled" associé à un type d'élément "null" ne doit pas contenir le caractère '<'

How can I achieve this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
begiPass
  • 2,124
  • 6
  • 36
  • 57

1 Answers1

3

use lt (less than) instead

<p:commandLink id="buttonchoix" value="choisir" disabled="#{editCommandController.result lt car.stock}" />

also , take a look at next BalusC answer over here Conditionally displaying JSF components

Community
  • 1
  • 1
Daniel
  • 36,833
  • 10
  • 119
  • 200